aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2025-01-08 16:55:31 +0100
committerFlorian Weimer <fweimer@redhat.com>2025-01-08 16:55:31 +0100
commit39183f47d8bc9eda711c9797b18d69d7a02af91c (patch)
tree64589b4b205470cd5653d057192c7faf1887c208 /elf
parenta4c414796a4b7464b24f5e13f35042f3b7a2444b (diff)
downloadglibc-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/Makefile6
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