[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[committed] Don't use eu-strip on MIPS



Hi,

The tool eu-strip doesn't recognize sections with MIPS_DWARF sh_type as debug
sections, because elfutils doesn't have a MIPS backend (PR elfutils/24795).
Consequently, when using:
...
$ eu-strip a -o a.stripped -f a.debug
...
the debug section .debug_aranges remains in a.stripped:
...
$ readelf -S a.stripped  | grep .debug_aranges
  [29] .debug_aranges    MIPS_DWARF  ...
...
and is not present in a.debug:
...
$ readelf -S a.debug  | grep .debug_aranges
  [30] .debug_aranges    NOBITS  ...
...
and using dwz on a.debug results in:
...
dwz: a.debug: Found empty .debug_aranges section, not attempting dwz compression
FAIL: /home/vries/dwz/dwz.git/testsuite/dwz.tests/eu-strip-unstrip.sh
...

Fix this by skipping tests that require eu-strip for MIPS.

Committed to trunk.

Thanks,
- Tom

Don't use eu-strip on MIPS

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

	* testsuite/dwz.tests/dwz-tests.exp: Skipping tests that require
	eu-strip for MIPS.

---
 testsuite/dwz.tests/dwz-tests.exp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index ce7343f..24d5772 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -71,6 +71,16 @@ foreach test $tests {
             continue
         }
     }
+    if { [istarget mips*-*-*] } {
+	# elfutils don't have a MIPS backend (PR elfutils/24795), so eu-strip
+	# doesn't work as expected.
+	if { $basename == "eu-strip-unstrip.sh" || \
+		 $basename == "eu-strip-unstrip-multifile.sh" || \
+		 $basename == "pr24173.sh" } {
+	    unsupported "$test"
+	    continue
+	}
+    }
 
     set unsupported 0
     foreach required_exec $required_execs {