corsix / polyfill-glibc

Patch Linux executables for compatibility with older glibc
Other
143 stars 1 forks source link

Strip breaks some processed binaries #3

Open johnsonjh opened 1 month ago

johnsonjh commented 1 month ago

Example:

$ ninja
$ cp polyfill-glibc out

$ ./polyfill-glibc --remove-kernel-version --add-hash --add-gnu-hash --remove-debug ./out
$ ./out
No input file(s) specified.

$ strip out
$ ./out
[1]    1807806 segmentation fault  ./out

Using sstrip produces the following output:

sstrip: out: File too large
sstrip: out: ELF file may have been corrupted!
johnsonjh commented 1 month ago

It seems that it is the --add-hash option that causes strip and other tools to corrupt the binaries.

corsix commented 1 month ago

The sstrip case looks like a bug in sstrip, I've opened https://github.com/BR903/ELFkickers/pull/21 for it.

I'll look at strip in due course.