public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] tst-p_alignmod3.so: Disable GNU_RELRO segment
@ 2022-01-26 21:41 H.J. Lu
  2022-01-31  2:36 ` Michael Hudson-Doyle
  0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 2022-01-26 21:41 UTC (permalink / raw)
  To: libc-alpha

tst-p_alignmod3.so has invalid p_align on LOAD segments which can't work
with GNU_RELRO.  Pass -z norelro to linker to disable GNU_RELRO segment
to trigger

.../elf/tst-p_alignmod3.so: ELF load command address/offset not page-aligned

instead of

.../elf/tst-p_alignmod3.so: cannot change memory protections
---
 elf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elf/Makefile b/elf/Makefile
index daafb5cf12..6229add1fc 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -2619,7 +2619,7 @@ $(objpfx)tst-p_alignmod2.so: $(objpfx)tst-p_alignmod-base.so
 	cp $(objpfx)tst-p_alignmod-base.so $@
 	$(PYTHON) $(..)scripts/tst-elf-edit.py -a 1 $@
 
-LDFLAGS-tst-p_alignmod3.so += -Wl,-z,max-page-size=0x100,-z,common-page-size=0x100
+LDFLAGS-tst-p_alignmod3.so += -Wl,-z,max-page-size=0x100,-z,common-page-size=0x100,-z,norelro
 
 $(objpfx)tst-p_align3: $(objpfx)tst-p_alignmod3.so
 $(objpfx)tst-p_align3.out: tst-p_align3.sh $(objpfx)tst-p_align3
-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-31 15:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 21:41 [PATCH] tst-p_alignmod3.so: Disable GNU_RELRO segment H.J. Lu
2022-01-31  2:36 ` Michael Hudson-Doyle
2022-01-31  4:49   ` H.J. Lu
2022-01-31  7:49     ` Michael Hudson-Doyle
2022-01-31 15:26       ` H.J. Lu

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).