| 1 | #!/bin/sh -e |
| 2 | # Check that 'file' can distinguish stripped and unstripped binaries. |
| 3 | cd "$AUTOPKGTEST_TMP" |
| 4 | sh-elf-as /dev/null |
| 5 | if ! [ -e a.out ] |
| 6 | then |
| 7 | echo Failed to make a.out >&2 |
| 8 | exit 1 |
| 9 | fi |
| 10 | |
| 11 | file_unstripped=$(file a.out) |
| 12 | sh-elf-strip a.out |
| 13 | if [ "$(file a.out)" = "$file_unstripped" ] |
| 14 | then |
| 15 | echo Got \'$file_unstripped\' both times >&2 |
| 16 | exit 1 |
| 17 | fi |