From: "H.J. Lu" <hjl.tools@gmail.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] tst-p_alignmod3.so: Disable GNU_RELRO segment
Date: Wed, 26 Jan 2022 13:41:00 -0800 [thread overview]
Message-ID: <20220126214100.2433851-1-hjl.tools@gmail.com> (raw)
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
next reply other threads:[~2022-01-26 21:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 21:41 H.J. Lu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220126214100.2433851-1-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).