diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:55:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 17:55:52 +0000 |
commit | f7a951d79bc895eb2171c2570add9f4899794a10 (patch) | |
tree | cc0c7147f472fecbc93add134f5c0e5c1bb72529 /testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh | |
parent | Initial commit. (diff) | |
download | dwz-upstream.tar.xz dwz-upstream.zip |
Adding upstream version 0.15.upstream/0.15upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh b/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh new file mode 100644 index 0000000..15ed418 --- /dev/null +++ b/testsuite/dwz.tests/objcopy-eu-unstrip-multifile.sh @@ -0,0 +1,39 @@ +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 + +cp 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 ] + +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 3 dwz.err |