freestanding ELF dynamic library
Posted: Sat Jun 13, 2009 10:06 pm
Hi all
I compiled my shared library by:
gcc -ffreestanding -Wall -fPIC -c testingLibrary.c
gcc -shared -Wl,-soname,libTesting.so.1 -o libTesting.so testingLibrary.o
When I readelf -d libTesting.so
Dynamic section at offset 0x460 contains 21 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000e (SONAME) Library soname: [libTesting.so.1]
Why it still need libc.so.6 ? I have added -ffreestanding .
thanks
from Peter ([email protected])
I compiled my shared library by:
gcc -ffreestanding -Wall -fPIC -c testingLibrary.c
gcc -shared -Wl,-soname,libTesting.so.1 -o libTesting.so testingLibrary.o
When I readelf -d libTesting.so
Dynamic section at offset 0x460 contains 21 entries:
Tag Type Name/Value
0x00000001 (NEEDED) Shared library: [libc.so.6]
0x0000000e (SONAME) Library soname: [libTesting.so.1]
Why it still need libc.so.6 ? I have added -ffreestanding .
thanks
from Peter ([email protected])