This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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]

Referenced symbol not present in final image?


Using binutils 2.15:

Under what circumstances would the linker allow a symbol to be
referenced but not defined?

In the image, pthread_mutex_lock=0, so anyone trying to call
pthread_mutex_lock crashes when trying to access address 0.

When trying --trace-symbol, the symbol is referenced but never defined. 

$ arm-elf-gcc -Wl,-static -g [trimmed] -nostdlib  -nostartfiles
-L../romapp/install/lib -Ttarget.ld -trace-symbol=pthread_mutex_lock 
output/./main.o: reference to pthread_mutex_lock
/ecos-c/cdtworkspace/arm/install/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/lib/libsupc++.a(eh_alloc.o): reference to pthread_mutex_lock
/ecos-c/cdtworkspace/arm/install/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/lib/libstdc++.a(locale_init.o): reference to pthread_mutex_lock
/ecos-c/cdtworkspace/arm/install/bin/../lib/gcc/arm-elf/3.4.3/../../../../arm-elf/lib/libstdc++.a(allocator-inst.o): reference to pthread_mutex_lock



(My goal is to get libstdc++ w/gcc 3.4.3 working for
http://sources.redhat.com/ecos)



-- 
Øyvind Harboe
http://www.zylin.com



Attachment: target.ld
Description: Text document


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