https://sourceware.org/bugzilla/show_bug.cgi?id=33230
Bug ID: 33230
Summary: exec format error after strip
Product: binutils
Version: 2.45
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: cailulu at loongson dot cn
Target Milestone: ---
I have an aarch64 executable.
$ file no_strip.out
$ no_strip.out: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, with debug_info, not stripped
I used binutils-2_45-branch to build strip for the x86_64 target and used it to
process the aarch64 executable no_strip.out. strip can be executed "normally",
but strip.out cannot be executed and reports an error.
$ strip no_strip.out -o strip.out
$ ./strip.out
$ exec format error: ./strip.out
Comparing no_strip.out and strip.out, we can find that the machine field of
strip.out disappears.
$ file no_strip.out strip.out
$ no_strip.out: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, with debug_info, not stripped
$ strip.out: ELF 64-bit LSB executable, no machine, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux
3.7.0, stripped
If you use strip from binutils-2_44-branch to process no_strip.out, strip will
report an error and exit.
$ strip no_strip.out -o strip.out
$ strip: Unable to recognise the format of the input file `no_strip.out'
--
You are receiving this mail because:
You are on the CC list for the bug.