From: Nick Clifton <nickc@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] Fix "--only-keep-debug for ELF relocatables" binutils test for compilers which add .debug_macro sect
Date: Tue, 1 Aug 2023 13:40:15 +0000 (GMT) [thread overview]
Message-ID: <20230801134015.C03203858C53@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b99a9693430a9f04165b1b868f890b622bb1b46c
commit b99a9693430a9f04165b1b868f890b622bb1b46c
Author: Nick Clifton <nickc@redhat.com>
Date: Tue Aug 1 14:37:04 2023 +0100
Fix "--only-keep-debug for ELF relocatables" binutils test for compilers which add .debug_macro sections to object files.
PR 30699
* binutils/testsuite/binutils-all/objcopy.exp (keep_debug_symbols_for_elf_relocatable): Do not add sections containing the string "debug_" to the list of non-debug sections.
Diff:
---
binutils/testsuite/binutils-all/objcopy.exp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 1145835d8b7..41070c3e0de 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1028,7 +1028,11 @@ proc keep_debug_symbols_for_elf_relocatable { prog flags test } {
{[^a-zA-Z]+([a-zA-Z0-9_\.]+)[ \t]+([A-Z]+)[ \t]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ [0-9]+[ \t]+([A-Z]*)[ \t]+[0-9]+(.*)} \
$got all name type flag rest] } {
if { $type != "NOTE" && [regexp {[AG]} $flag] } {
- lappend non_debug_sections $name
+ # PR 30699: Some debug sections can be in a group, so
+ # exclude sections whose name includes "debug_"
+ if { ! [regexp {debug_} $name] } {
+ lappend non_debug_sections $name
+ }
}
set got $rest
}
@@ -1086,6 +1090,7 @@ switch [copy_setup] {
untested $test5
if [is_elf_format] {
untested $test6
+ untested $test7
}
}
"3" {
reply other threads:[~2023-08-01 13:40 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=20230801134015.C03203858C53@sourceware.org \
--to=nickc@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).