strip producing invalid executable

Paul Edwards mutazilah@gmail.com
Sun Sep 14 21:58:05 GMT 2025


I produce 32-bit x86 ELF executables, with relocations, using pdld.

They run fine.


But when I attempt to strip them (noting that "file" claims
they are already stripped), strip silently produces a broken
executable.


root@kerravon2-pc:/home/kerravon/w2kshare# ./pdptest.orig
welcome to pdptest
main function is at 004011F4
allocating 10 bytes
m1 is EA192004
allocating 20 bytes
m2 is EA191004
stack is around FFA44934
usage: pdptest [-bb/-tt/-tb/-bt] <infile> <outfile>
default is text to text copy

root@kerravon2-pc:/home/kerravon/w2kshare# ./pdptest.strip
Segmentation fault (core dumped)
root@kerravon2-pc:/home/kerravon/w2kshare#


root@kerravon2-pc:/home/kerravon/w2kshare# ls -l pdptest.orig
-rwxrwx--- 1 root vboxsf 39480 Sep 14 18:27 pdptest.orig
root@kerravon2-pc:/home/kerravon/w2kshare# ls -l pdptest.strip
-rwxrwx--- 1 root vboxsf 39340 Sep 14 18:28 pdptest.strip
root@kerravon2-pc:/home/kerravon/w2kshare# file pdptest.orig
pdptest.orig: ELF 32-bit LSB executable, Intel 80386, version 1
(SYSV), statically linked, stripped
root@kerravon2-pc:/home/kerravon/w2kshare#


If anyone is interested, I have uploaded those two files as:

https://pdos.org/stripbug.zip

(noting that it may be a pdld bug that is undetectable by
strip, so not a strip bug as the name suggests).


I assume there haven't been massive changes to strip since:

root@kerravon2-pc:/home/kerravon/w2kshare# strip --version
GNU strip (GNU Binutils for Ubuntu) 2.38


Thanks. Paul.


More information about the Binutils mailing list