diff options
author | Florian Weimer <fweimer@redhat.com> | 2025-01-08 16:55:31 +0100 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2025-01-08 16:55:31 +0100 |
commit | 39183f47d8bc9eda711c9797b18d69d7a02af91c (patch) | |
tree | 64589b4b205470cd5653d057192c7faf1887c208 /elf | |
parent | a4c414796a4b7464b24f5e13f35042f3b7a2444b (diff) | |
download | glibc-39183f47d8bc9eda711c9797b18d69d7a02af91c.zip glibc-39183f47d8bc9eda711c9797b18d69d7a02af91c.tar.gz glibc-39183f47d8bc9eda711c9797b18d69d7a02af91c.tar.bz2 |
elf: Minimize library dependencies of tst-nolink-libc.c
On 32-bit Arm, -fasynchronous-unwind-tables creates a reference
to the symbol __aeabi_unwind_cpp_pr0. Compile the tests without
this flag even if it is passed as part of CC, to avoid linker
failures.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/elf/Makefile b/elf/Makefile index 8f11c04..048878d 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -3377,8 +3377,10 @@ endif # a port adds them to the tests variables. Neither test variant is # linked against libc.so, but tst-nolink-libc-1 is linked against # ld.so. The test is always run directly, not under the dynamic -# linker. -CFLAGS-tst-nolink-libc.c += $(no-stack-protector) +# linker. It is necessary to minimize run-time dependencies, by +# disabling stack protection and unwinding. +CFLAGS-tst-nolink-libc.c += $(no-stack-protector) \ + -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables $(objpfx)tst-nolink-libc-1: $(objpfx)tst-nolink-libc.o $(objpfx)ld.so $(LINK.o) -nostdlib -nostartfiles -o $@ $< \ -Wl,--dynamic-linker=$(objpfx)ld.so,--no-as-needed $(objpfx)ld.so |