aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2020-03-09 14:37:26 -0700
committerH.J. Lu <hjl.tools@gmail.com>2023-06-29 10:29:47 -0700
commitb7b6f36275d5ff6a9e2bf679a5e3d354e531648a (patch)
tree12f11217f9321a78b8c67e2d5bbbaf231c61e798 /ld
parent3da917d534954ae727a2174039a3786b474dd712 (diff)
downloadgdb-b7b6f36275d5ff6a9e2bf679a5e3d354e531648a.zip
gdb-b7b6f36275d5ff6a9e2bf679a5e3d354e531648a.tar.gz
gdb-b7b6f36275d5ff6a9e2bf679a5e3d354e531648a.tar.bz2
ld: Add -z nosectionheader test to bootstrap.exp
PR ld/25617 * testsuite/ld-bootstrap/bootstrap.exp: Add -z nosectionheader test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ld-bootstrap/bootstrap.exp10
1 files changed, 8 insertions, 2 deletions
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index b189a0c..8b83c51 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 ""
}