From: H.J. Lu <hjl@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] ld: Add -z nosectionheader test to bootstrap.exp
Date: Thu, 29 Jun 2023 17:36:44 +0000 (GMT) [thread overview]
Message-ID: <20230629173644.EBE103858CDA@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b7b6f36275d5ff6a9e2bf679a5e3d354e531648a
commit b7b6f36275d5ff6a9e2bf679a5e3d354e531648a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Mon Mar 9 14:37:26 2020 -0700
ld: Add -z nosectionheader test to bootstrap.exp
PR ld/25617
* testsuite/ld-bootstrap/bootstrap.exp: Add -z nosectionheader
test.
Diff:
---
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 b189a0c7098..8b83c51ee8b 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -66,6 +66,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
@@ -94,9 +97,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 ""
}
reply other threads:[~2023-06-29 17:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20230629173644.EBE103858CDA@sourceware.org \
--to=hjl@sourceware.org \
--cc=bfd-cvs@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).