Hi,
while trying to get TinyCC to link to Debian sid's armel libraries, I've
encountered a problem with weak symbols. The situation is as follows:

- crti.o contains a R_ARM_PLT32 and R_ARM_GOT32 relocation to the weak
  undefined symbol __gmon_start__
- no library defines this symbol
- TinyCC compiles this to an application containing two STB_WEAK SHN_UNDEF
  symbols __gmon_start__, one with value 0 and one with the offset of the
  PLT entry as value
- libgcc_s.so.1 contains a STB_WEAK SHN_UNDEF symbol __gmon_start__
- when the application is run, libgcc_s.so.1 is given the address of the
  PLT entry in the application as value of __gmon_start__
- SIGSEGV

When linking with GNU ld there is only one STB_WEAK SHN_UNDEF __gmon_start__
with value 0.

  Daniel

_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to