public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Handle section overlap from objcopy --only-keep-debug
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <20190710193202.GA17609@delia> (raw)

Hi,

On debian 7 for MIPS, I run into:
...
dwz: Section overlap detected
dwz: Section header table: [0x628, 0xcb8)
dwz: Section 26: 0x824
FAIL: testsuite/dwz.tests/objcopy-eu-unstrip.sh
...
which is caused by running dwz with as argument an executable obtained using
objcopy --only-keep-debug.

Fix this by marking the test-case unsupported if dwz bails out with "Section
overlap detected" error.

Committed to trunk.

Thanks,
- Tom

Handle section overlap from objcopy --only-keep-debug

2019-07-10  Tom de Vries  <tdevries@suse.de>

	* testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh: Mark
	unsupportedif dwz bails out with "Section overlap detected" error.
	* testsuite/dwz.tests/objcopy-eu-unstrip.sh:

---
 testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh | 12 ++++++++++--
 testsuite/dwz.tests/objcopy-eu-unstrip.sh           | 12 ++++++++++--
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh b/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh
index 87cf313..bc8c0b8 100644
--- a/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh
+++ b/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh
@@ -5,12 +5,20 @@ objcopy --strip-debug 1 1.stripped
 
 cp 1.debug 2.debug
 
-dwz -m 3 1.debug 2.debug
+if dwz -m 3 1.debug 2.debug 2> dwz.err; status=$?; then
+    true
+fi
 
 rm 2.debug
 
+if grep -q "dwz: Section overlap detected" dwz.err; then
+    exit 77
+fi
+
+[ $status -eq 0 ]
+
 eu-unstrip 1.stripped 1.debug -o 1.unstripped
 
 smaller-than.sh 1.unstripped 1
 
-rm -f 1 1.debug 1.stripped 1.unstripped 3
+rm -f 1 1.debug 1.stripped 1.unstripped 3 dwz.err
diff --git a/testsuite/dwz.tests/objcopy-eu-unstrip.sh b/testsuite/dwz.tests/objcopy-eu-unstrip.sh
index 2645d25..dc068d9 100644
--- a/testsuite/dwz.tests/objcopy-eu-unstrip.sh
+++ b/testsuite/dwz.tests/objcopy-eu-unstrip.sh
@@ -3,10 +3,18 @@ cp ../hello 1
 objcopy --only-keep-debug 1 1.debug
 objcopy --strip-debug 1 1.stripped
 
-dwz 1.debug
+if dwz 1.debug 2> dwz.err; status=$?; then
+    true
+fi
+
+if grep -q "dwz: Section overlap detected" dwz.err; then
+    exit 77
+fi
+
+[ $status -eq 0 ]
 
 eu-unstrip 1.stripped 1.debug -o 1.unstripped
 
 smaller-than.sh 1.unstripped 1
 
-rm -f 1 1.debug 1.stripped 1.unstripped
+rm -f 1 1.debug 1.stripped 1.unstripped dwz.err

                 reply	other threads:[~2019-07-10 19:32 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=20190710193202.GA17609@delia \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@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).