[PATCH v3] elf: Second ld.so relocation only if libc.so has been loaded

Florian Weimer fweimer@redhat.com
Tue Jan 7 17:08:34 GMT 2025


* Andreas Schwab:

> On Jan 07 2025, Florian Weimer wrote:
>
>> * Andreas Schwab:
>>
>>> The tests fail to link on armv7:
>>>
>>> gcc   -nostdlib -nostartfiles -o /home/abuild/rpmbuild/BUILD/glibc-2.40.9000.712.g706209867/cc-base/elf/tst-nolink-libc-1 /home/abuild/rpmbuild/BUILD/glibc-2.40.9000.712.g706209867/cc-base/elf/tst-nolink-libc.o \
>>>   -Wl,--dynamic-linker=/home/abuild/rpmbuild/BUILD/glibc-2.40.9000.712.g706209867/cc-base/elf/ld.so,--no-as-needed /home/abuild/rpmbuild/BUILD/glibc-2.40.9000.712.g706209867/cc-base/elf/ld.so
>>> /usr/lib/gcc/armv7hl-suse-linux-gnueabi/14/../../../../armv7hl-suse-linux-gnueabi/bin/ld: /home/abuild/rpmbuild/BUILD/glibc-2.40.9000.712.g706209867/cc-base/elf/tst-nolink-libc.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
>>> collect2: error: ld returned 1 exit status
>>
>> What are your compiler flags?
>
> 'CFLAGS= -O2 -Wall -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -g'

Thanks.  I submitted a patch:

  [PATCH] elf: Minimize library dependencies of tst-nolink-libc.c
  <https://inbox.sourceware.org/libc-alpha/87ikqqeeoz.fsf@oldenburg.str.redhat.com/>

Florian



More information about the Libc-alpha mailing list