This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add a strong symbol observable by dynamic linker


I am doing a research project and need to add a new function, say shift_sigaction, into glibc, and make it observable by the dynamic linker (

I have added entries in Versions file, to export the strong symbol. But when building, it still cannot find the shift_sigaction:


/home/wuxi/shift/install/compiler-4.1.1/bin/gcc -nostdlib -nostartfiles -shared \
-Wl,-z,combreloc -Wl,-z,defs -Wl,--verbose 2>&1 | \
sed -e '/^=========/,/^=========/!d;/^=========/d' \
-e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADERS;/' \
> /home/wuxi/shift/build/elf/
/home/wuxi/shift/install/compiler-4.1.1/bin/gcc -nostdlib -nostartfiles -shared -o /home/wuxi/shift/build/elf/ \
-Wl,-z,combreloc -Wl,-z,defs \
/home/wuxi/shift/build/elf/librtld.os -Wl,--version-script=/home/wuxi/shift/build/ \
-Wl, -T /home/wuxi/shift/build/elf/ /home/wuxi/shift/src/glibc2.5/shift/shift_bitmap_signal.o
/home/wuxi/shift/src/glibc2.5/shift/shift_bitmap_signal.o: In function `B_hook_shift_sigaction_handler':
shift_bitmap_signal.c:(.text+0x72): undefined reference to `shift_sigaction'
shift_bitmap_signal.c:(.text+0xe2): undefined reference to `shift_sigaction'
/home/wuxi/shift/src/glibc2.5/shift/shift_bitmap_signal.o: In function `B_sigaction':
shift_bitmap_signal.c:(.text+0x1c2): undefined reference to `shift_mmap'
collect2: ld returned 1 exit status
make[2]: *** [/home/wuxi/shift/build/elf/] Error 1
make[2]: Leaving directory `/home/wuxi/shift/src/glibc2.5/elf'
make[1]: *** [elf/subdir_lib] Error 2
make[1]: Leaving directory `/home/wuxi/shift/src/glibc2.5'
make: *** [all] Error 2


So, what do I miss here?

Thanks :-)

yours sincerely


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]