'bionic libc'에 해당되는 글 3건

  1. 2012.11.08 Bionic libc (3)
  2. 2012.11.08 Bionic libc (2)
  3. 2012.10.30 Bionic libc

Bionic 이 지원안하고 안 할려는 리스트:

 

1. C++ exception (크고 느린 코드 생성원인)

2. pthread cancellation (C 코드 복잡성만 증가. 이런거에 의존하지 말고 multi-thread 코딩을 잘해라)

3. init 함수가 던진 c++ exception에 대한 pthread_once()지원 안함  (init함수가 하는 fork()도)

4. locale & wide characters (i18n을 위해 대신 ICU)

5. 유저 계정 관련 함수(getpwd 등)

Posted by code cat

a port of BSD C library to linux kernel with the following additions/changes:

- no support fo locales

- no support for wide chars (multi-byte characters)

- own smallish implementation of pthreads based on Linux futexes

- support fo x86, ARM, and ARM thumb cpu instruction sets and kernel interfaces

 

To add new syscalls:

Bionic provides the 'gensyscalls.py' script to automatically generate syscall stubs from the list defined in the file 'SYSCALLS.TXT'

To add a new syscall:

1. SYSCALL.TXT 수정

2. syscall에 대한 새로운 라인 추가:

return_type syscall_name(parameters)    syscall_number

3. syscall function과 entry name을 구분 짓고 싶으면:

return_type funcname:syscall_name(parameters)    syscall_number

4. 추가로 syscall number가 ARM 과 x86끼리 다르면,

return_type funcname[:syscall_name](parameters)    arm_number, x86_number

5. 플랫폼에 syscall이 구현안되었다고 나타내려면 -1을 사용하라.

void __set_tls(void*)    arm_number, -1     (예제)

 

자세한 내용은 SYSCALLS.TXT를 참조하고, 'checksyscalls.py'를 사용하여, syscall number를 제대로 사용하였는지 체크할 수도 있다.(리눅스 커널 헤더들안의 숫자와 비교한다.)

'안드로이드 > 프레임워크' 카테고리의 다른 글

[Android] OTA DownloadProvider document  (0) 2013.10.18
Bionic libc (3)  (0) 2012.11.08
Bionic libc  (0) 2012.10.30
안드로이드 init.rc (oom_adj값)  (0) 2012.09.27
Dalvik Virtual Machine 와 odex  (0) 2012.08.13
Posted by code cat

출처: wikipeida (http://en.wikipedia.org/wiki/Bionic_(software))

The Bionic libc is a derivation of the BSD standard C library code that was originally developed by Google for the Android embedded system operating system. Bionic has several major Linux-specific features and development continues independent of other code bases. The publicly-stated goals for Bionic are:[1][2]
BSD license: Android uses a Linux kernel which is under the GNU General Public License (GPL), but Google wished to isolate Android applications from the effects of the GPL.
Small size: Bionic is much smaller than GNU libc (glibc) and somewhat smaller than uClibc.
Speed: Bionic is designed for CPUs at relatively low clock frequencies.

Bionic lacks many features found in full libc implementations, such as wide character and C++ exception handling support.[1][3][4] Also some functions defined in the Bionic header are still unimplemented, which may trigger unexpected behavior in some cases.[1][4][5][6]

As of Android Jelly Bean (4.1), bionic does not include support for Glibc's FORTIFY_SOURCE. FORTIFY_SOURCE is a feature where unsafe string and memory functions (such as strcpy, strcat, and memcpy) are replaced with safer variants (similar to BSD's lstrcpy and lstrcat) when buffer sizes can be determined at compile time. Future releases of the library plan to support -DFORTIFY_SOURCE=1.[7]

The recommended way of directly using and extending Bionic is with the Android Native Development Kit.

'안드로이드 > 프레임워크' 카테고리의 다른 글

Bionic libc (3)  (0) 2012.11.08
Bionic libc (2)  (0) 2012.11.08
안드로이드 init.rc (oom_adj값)  (0) 2012.09.27
Dalvik Virtual Machine 와 odex  (0) 2012.08.13
안드로이드 바인더 ipc  (0) 2011.10.23
Posted by code cat