[glibc/google/grte/v5-2.27/master] Compile dl-reloc-static-pie.c with -Wa, -mrelax-relocations=yes
Stan Shebs
shebs@sourceware.org
Tue Oct 20 20:35:06 GMT 2020
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e862538954ba0175c028b385d3c9b189dcf1a44a
commit e862538954ba0175c028b385d3c9b189dcf1a44a
Author: Fangrui Song <maskray@google.com>
Date: Tue Oct 20 13:03:51 2020 -0700
Compile dl-reloc-static-pie.c with -Wa,-mrelax-relocations=yes
Diff:
---
elf/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/elf/Makefile b/elf/Makefile
index 827fe13178..6b2a347ec7 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -65,6 +65,9 @@ all-rtld-routines = $(rtld-routines) $(sysdep-rtld-routines)
# Hack around a clang alias+optimization problem.
CFLAGS-rtld.c += -O0
+# elf_get_dynamic_info reads _dl_debug_mask before relocations are applied. Work around with R_X86_64_REX_GOTPCRELX.
+CFLAGS-dl-reloc-static-pie.c += -Wa,-mrelax-relocations=yes
+
CFLAGS-dl-runtime.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-lookup.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-dl-iterate-phdr.c += $(uses-callbacks)
More information about the Glibc-cvs
mailing list