From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Cc: Kaylee Blake <klkblake@gmail.com>, Alan Modra <amodra@gmail.com>,
Nick Clifton <nickc@redhat.com>
Subject: [PATCH v2 4/6] binutils: Add a --strip-sections test
Date: Sat, 3 Jul 2021 13:14:00 -0700 [thread overview]
Message-ID: <20210703201402.1136267-5-hjl.tools@gmail.com> (raw)
In-Reply-To: <20210703201402.1136267-1-hjl.tools@gmail.com>
PR ld/25617
* testsuite/binutils-all/objcopy.exp: Run strip-sections-1.
* testsuite/binutils-all/strip-sections-1.d: New file.
---
binutils/testsuite/binutils-all/objcopy.exp | 5 +++++
binutils/testsuite/binutils-all/strip-sections-1.d | 5 +++++
2 files changed, 10 insertions(+)
create mode 100644 binutils/testsuite/binutils-all/strip-sections-1.d
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index ef251876a02..990806dbf30 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1258,6 +1258,11 @@ if [is_elf_format] {
verbose [file rootname $t]
run_dump_test [file rootname $t]
}
+
+ # Test --strip-sections
+ run_dump_test "strip-sections-1" [list \
+ [list source strip-15${reloc_format}.s] \
+ [list as "${elf64} --defsym RELOC=${reloc}"]]
}
run_dump_test "localize-hidden-2"
diff --git a/binutils/testsuite/binutils-all/strip-sections-1.d b/binutils/testsuite/binutils-all/strip-sections-1.d
new file mode 100644
index 00000000000..76b1dd69c70
--- /dev/null
+++ b/binutils/testsuite/binutils-all/strip-sections-1.d
@@ -0,0 +1,5 @@
+#PROG: strip
+#strip: -g --strip-sections
+#readelf: -S
+
+There are no sections in this file.
--
2.31.1
next prev parent reply other threads:[~2021-07-03 20:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-03 20:13 [PATCH v2 0/6] ELF: Strip section header in ELF objects H.J. Lu
2021-07-03 20:13 ` [PATCH v2 1/6] " H.J. Lu
2021-07-03 20:13 ` [PATCH v2 2/6] bfd: Improve nm and objdump without section header H.J. Lu
2021-07-03 20:13 ` [PATCH v2 3/6] ld: Add a simple test for -z nosectionheader H.J. Lu
2021-07-03 20:14 ` H.J. Lu [this message]
2021-07-03 20:14 ` [PATCH v2 5/6] ld: Add tests for -z nosectionheader and --strip-sections H.J. Lu
2021-07-03 20:14 ` [PATCH v2 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=20210703201402.1136267-5-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=klkblake@gmail.com \
--cc=nickc@redhat.com \
/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).