From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Subject: [PATCH 6/6] ld: Add -z nosectionheader test to bootstrap.exp
Date: Fri, 20 Mar 2020 17:08:33 -0700 [thread overview]
Message-ID: <20200321000833.1138564-7-hjl.tools@gmail.com> (raw)
In-Reply-To: <20200321000833.1138564-1-hjl.tools@gmail.com>
PR ld/25617
* testsuite/ld-bootstrap/bootstrap.exp: Add -z nosectionheader
test.
---
ld/testsuite/ld-bootstrap/bootstrap.exp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index ba51e50a02..5d74caf2d6 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -55,6 +55,9 @@ set test_flags {"" "strip" "--static" "-Wl,--traditional-format"
if { [istarget "powerpc-*-*"] } {
lappend test_flags "-Wl,--ppc476-workaround"
}
+if { [is_elf_format] && ![is_bad_symtab] } {
+ lappend test_flags "-Wl,-z,nosectionheader"
+}
set gcc_B_opt_save $gcc_B_opt
@@ -80,9 +83,12 @@ foreach flags $test_flags {
set testname "bootstrap"
}}
- # --static is meaningless and --relax is incompatible with -r.
+ # --static is meaningless. --relax and -z nosectionheader are
+ # incompatible with -r.
regsub -- "-Wl," $flags "" partial_flags
- if { "$partial_flags" == "--static" || "$partial_flags" == "--relax" } {
+ if { "$partial_flags" == "--static" \
+ || "$partial_flags" == "--relax" \
+ || [string match "*nosectionheader*" "$partial_flags"] } {
set partial_flags ""
}
--
2.25.1
next prev parent reply other threads:[~2020-03-21 0:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-21 0:08 [PATCH 0/6] ELF: Strip section header in ELF objects H.J. Lu
2020-03-21 0:08 ` [PATCH 1/6] " H.J. Lu
2020-03-21 0:08 ` [PATCH 2/6] bfd: Improve nm and objdump without section header H.J. Lu
2020-03-21 0:08 ` [PATCH 3/6] ld: Add a simple test for -z nosectionheader H.J. Lu
2020-03-21 0:08 ` [PATCH 4/6] binutils: Add a --strip-sections test H.J. Lu
2020-03-21 0:08 ` [PATCH 5/6] ld: Add tests for -z nosectionheader and --strip-sections H.J. Lu
2020-03-21 0:08 ` H.J. Lu [this message]
2023-05-30 17:12 [PATCH 0/6] ELF: Strip section header in ELF objects H.J. Lu
2023-05-30 17:12 ` [PATCH 6/6] ld: Add -z nosectionheader test to bootstrap.exp 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=20200321000833.1138564-7-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=binutils@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).