aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-07-20 12:23:59 +0930
committerAlan Modra <amodra@gmail.com>2024-07-20 13:54:00 +0930
commit237c05a65fea828bb46a7209638b26b665d3d781 (patch)
tree3bc51227173d7b5536143b7c145ac3d6a853dd4d /binutils
parent3f55acd0ec09dc06934d25d5dfcd64852c812890 (diff)
downloadgdb-237c05a65fea828bb46a7209638b26b665d3d781.zip
gdb-237c05a65fea828bb46a7209638b26b665d3d781.tar.gz
gdb-237c05a65fea828bb46a7209638b26b665d3d781.tar.bz2
Re: binutils: Add a test for strip with build notes
The new test wasn't being run, and failed due to relocations against .gnu.build.attributes being stripped by default strip behaviour. We probably should be keeping these relocations, but I haven't made that change here. BTW, the new test fails on ia64-hpux but that's just a repeat of the existing note-5 fail. PR 31999 * testsuite/binutils-all/strip-16.d: strip with --strip-unneeded and --merge-notes. * testsuite/binutils-all/objcopy.exp: Run the new test. Sort other strip tests.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp12
-rw-r--r--binutils/testsuite/binutils-all/strip-16.d1
2 files changed, 7 insertions, 6 deletions
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 8b432f3..2e105fe 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1273,6 +1273,11 @@ if [is_elf_format] {
run_dump_test "strip-7"
run_dump_test "strip-8"
run_dump_test "strip-9"
+ # This requires STB_GNU_UNIQUE support with OSABI set to GNU.
+ if { [supports_gnu_unique] } {
+ run_dump_test "strip-10"
+ }
+ run_dump_test "strip-11"
run_dump_test "strip-12"
if { [istarget "mips64*-*-openbsd*"] \
@@ -1308,12 +1313,7 @@ if [is_elf_format] {
run_dump_test "strip-15" [list \
[list source strip-15${reloc_format}.s] \
[list as "${elf64} --defsym RELOC=${reloc}"]]
-
- # This requires STB_GNU_UNIQUE support with OSABI set to GNU.
- if { [supports_gnu_unique] } {
- run_dump_test "strip-10"
- }
- run_dump_test "strip-11"
+ run_dump_test "strip-16"
if { [istarget "i*86-*"] || [istarget "x86_64-*-*"] } {
# Check to make sure we don't strip a symbol named in relocations.
diff --git a/binutils/testsuite/binutils-all/strip-16.d b/binutils/testsuite/binutils-all/strip-16.d
index b2c87a9..039a60b 100644
--- a/binutils/testsuite/binutils-all/strip-16.d
+++ b/binutils/testsuite/binutils-all/strip-16.d
@@ -1,4 +1,5 @@
#PROG: strip
+#strip: --strip-unneeded --merge-notes
#as: --generate-missing-build-notes=yes
#readelf: --notes --wide
#name: strip with build notes