From f7a951d79bc895eb2171c2570add9f4899794a10 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 19:55:52 +0200 Subject: Adding upstream version 0.15. Signed-off-by: Daniel Baumann --- testsuite/dwz.tests/objcopy-eu-unstrip.sh | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 testsuite/dwz.tests/objcopy-eu-unstrip.sh (limited to 'testsuite/dwz.tests/objcopy-eu-unstrip.sh') diff --git a/testsuite/dwz.tests/objcopy-eu-unstrip.sh b/testsuite/dwz.tests/objcopy-eu-unstrip.sh new file mode 100644 index 0000000..18593d0 --- /dev/null +++ b/testsuite/dwz.tests/objcopy-eu-unstrip.sh @@ -0,0 +1,35 @@ +cp ../hello 1 + +objcopy --only-keep-debug 1 1.debug +objcopy --strip-debug 1 1.stripped + +if ! eu-unstrip 1.stripped 1.debug -o 1.unstripped; then + exit 77 +fi +rm 1.unstripped + +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 ] + +version=$(eu-unstrip --version | head -n 1 | cut -d ' ' -f3) +major=$(echo $version | sed 's%\..*%%') +minor=$(echo $version | sed 's%.*\.%%') +if [ $major -gt 0 ] || [ $minor -ge 168 ]; then + true +else + exit 77 +fi + +eu-unstrip 1.stripped 1.debug -o 1.unstripped + +# An unstripped exec can end up larger than the original (PR elfutils/24809). +#smaller-than.sh 1.unstripped 1 + +rm -f 1 1.debug 1.stripped 1.unstripped dwz.err -- cgit v1.2.3