tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Tinycc-devel] Weak symbol problem


From: Daniel Glöckner
Subject: [Tinycc-devel] Weak symbol problem
Date: Sat, 15 May 2010 02:06:05 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]