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

Re: GCC -pie patch (kinda) ....

On Sat, 1 Mar 2008, Michael Casadevall wrote:

> bc_nonshared.a(elf-init.oST): In function `__libc_csu_init':
> elf-init.c:(.text+0x1c): undefined reference to `__init_array_start'
> elf-init.c:(.text+0x26): undefined reference to `__init_array_end'
> elf-init.c:(.text+0x44): undefined reference to `__init_array_end'
> /opt/crosstool/gcc-4.1.1-glibc-2.3.6/m68k-unknown-linux-gnu/bin/../lib/gcc/m68k-unknown-linux-gnu/4.1.2/../../../../m68k-unknown-linux-gnu/lib/libc_nonshared.a(elf-init.oST):
> In function `__libc_csu_fini':
> elf-init.c:(.text+0x6e): undefined reference to `__fini_array_end'
> elf-init.c:(.text+0x76): undefined reference to `__fini_array_start'
> elf-init.c:(.text+0x8a): undefined reference to `__fini_array_start'
> collect2: ld returned 1 exit status

These errors generally (on whatever ELF platform you encounter them) 
indicate a linker script problem, since these symbols are meant to be 
defined by a linker script.  In this case, a missing linker script, patch: 

> It's possible that since we do not support TLS, our linker no longer supports

init_array and fini_array support are nothing to do with TLS.

Joseph S. Myers

Reply to: