public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Compile dl-reloc-static-pie.c with -Wa, -mrelax-relocations=yes
@ 2020-10-20 20:35 Stan Shebs
  0 siblings, 0 replies; only message in thread
From: Stan Shebs @ 2020-10-20 20:35 UTC (permalink / raw)
  To: glibc-cvs

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-20 20:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20 20:35 [glibc/google/grte/v5-2.27/master] Compile dl-reloc-static-pie.c with -Wa, -mrelax-relocations=yes Stan Shebs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).