public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
* [committed] Handle section overlap from objcopy --only-keep-debug
@ 2019-01-01  0:00 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01  0:00 UTC (permalink / raw)
  To: dwz, jakub

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-10 19:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01  0:00 [committed] Handle section overlap from objcopy --only-keep-debug Tom de Vries

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).