[uClibc] non-PIC ARM assembly

Mark Glines mark at glines.org
Thu Jun 9 16:18:09 UTC 2005

Hi guys,

With binutils 2.15, gcc 3.4.1 and uClibc 0.9.27, dynamic linking on ARM
segfaults when relocating libuClibc-0.9.27.so.  (binutils and gcc were
patched up with the patches from crosstool-0.35).

It seems ld 2.15 doesn't detect relocations in .text properly, and fails
to set DT_TEXTREL properly.  And, unfortunately, it seems libc.so
contains some non-PIC code which requires relocations in .text.  Since
DT_TEXTREL wasn't set, the reloc code was segfaulting when it tried to
write to the .text segment. Specifically, it was segfaulting when trying
to relocate the "errno" symbol, for libc/sysdeps/linux/arm/clone.S (the
__syscall_error routine).

The bug in GNU ld is fixable by applying
and rebuilding binutils, so I have a workaround and I can get on with
life.  But I'm writing to ask: would you be interested in patches to
PICify the code?  Or is someone else already working on it?  Or am I
completely misunderstanding something?


More information about the uClibc mailing list