From: "H.J. Lu" <hjl.tools@gmail.com>
To: binutils@sourceware.org
Cc: Alan Modra <amodra@gmail.com>,
Florian Weimer <fweimer@redhat.com>,
Kaylee Blake <klkblake@gmail.com>
Subject: [PATCH v4 4/7] ld: Add simple tests for -z nosectionheader
Date: Tue, 6 Jun 2023 10:58:43 -0700 [thread overview]
Message-ID: <20230606175846.399377-5-hjl.tools@gmail.com> (raw)
In-Reply-To: <20230606175846.399377-1-hjl.tools@gmail.com>
From: Kaylee Blake <klkblake@gmail.com>
2020-06-06 Kaylee Blake <klkblake@gmail.com>
H.J. Lu <hongjiu.lu@intel.com>
PR ld/25617
* testsuite/ld-elf/nosectionheader-1.d: New file.
* testsuite/ld-elf/nosectionheader-2.d: Likewise.
---
| 14 ++++++++++++++
| 4 ++++
2 files changed, 18 insertions(+)
create mode 100644 ld/testsuite/ld-elf/nosectionheader-1.d
create mode 100644 ld/testsuite/ld-elf/nosectionheader-2.d
--git a/ld/testsuite/ld-elf/nosectionheader-1.d b/ld/testsuite/ld-elf/nosectionheader-1.d
new file mode 100644
index 00000000000..cbaea669b9a
--- /dev/null
+++ b/ld/testsuite/ld-elf/nosectionheader-1.d
@@ -0,0 +1,14 @@
+#source: start.s
+#ld: -z nosectionheader
+#readelf: -h -S
+#xfail: [uses_genelf]
+# These targets don't support -z.
+
+#...
+ Start of section headers:[ \t]+0 \(bytes into file\)
+#...
+ Size of section headers:[ \t]+0 \(bytes\)
+ Number of section headers:[ \t]+0
+ Section header string table index:[ \t]+0
+
+There are no sections in this file.
--git a/ld/testsuite/ld-elf/nosectionheader-2.d b/ld/testsuite/ld-elf/nosectionheader-2.d
new file mode 100644
index 00000000000..38c344ad697
--- /dev/null
+++ b/ld/testsuite/ld-elf/nosectionheader-2.d
@@ -0,0 +1,4 @@
+#source: start.s
+#ld: -r -z nosectionheader
+#error: -r and -z nosectionheader may not be used together
+#xfail: [uses_genelf]
--
2.40.1
next prev parent reply other threads:[~2023-06-06 17:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 17:58 [PATCH v4 0/7] ELF: Strip section header in ELF objects H.J. Lu
2023-06-06 17:58 ` [PATCH v4 1/7] " H.J. Lu
2023-06-06 17:58 ` [PATCH v4 2/7] ELF: Discard non-alloc sections without section header H.J. Lu
2023-06-06 17:58 ` [PATCH v4 3/7] bfd: Improve nm and objdump " H.J. Lu
2023-07-01 2:12 ` Simon Marchi
2023-07-07 15:26 ` H.J. Lu
2023-07-10 3:30 ` Simon Marchi
2023-07-13 5:02 ` Alan Modra
2023-07-13 5:34 ` Fangrui Song
2023-07-13 21:58 ` Mark Wielaard
2023-07-19 6:21 ` Alan Modra
2023-06-06 17:58 ` H.J. Lu [this message]
2023-06-06 17:58 ` [PATCH v4 5/7] binutils: Add a --strip-section-headers test H.J. Lu
2023-06-06 17:58 ` [PATCH v4 6/7] ld: Add tests for -z nosectionheader and --strip-section-headers H.J. Lu
2023-06-29 20:56 ` H.J. Lu
2023-07-06 1:27 ` Alan Modra
2023-06-06 17:58 ` [PATCH v4 7/7] 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=20230606175846.399377-5-hjl.tools@gmail.com \
--to=hjl.tools@gmail.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=fweimer@redhat.com \
--cc=klkblake@gmail.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).