patchelf icon indicating copy to clipboard operation
patchelf copied to clipboard

patchelf for elf i686 binary seems to be broken

Open tesuji opened this issue 10 months ago • 0 comments

Might relate to #524. I tried splitting the patchelf command into 2 steps: --set-rpath, and then --set-interpreter. But the binary is still broken.

Describe the bug

The binary patched with patchefl raises sigsegv when run. Meanwhile, running via ./ld is OK.

Steps To Reproduce

Please include exact steps with an attached binary so that another person can reproduce the problem.

> patchelf --set-rpath './' --set-interpreter ./ld-linux.so.2 ./horcruxes
> ./horcruxes
fish: Job 1, './horcruxes' terminated by signal SIGSEGV (Address boundary error)

Run via ld with clean binary:

> ./ld-linux.so.2 --library-path './' ./horcruxes
Voldemort concealed his splitted soul inside 7 horcruxes.
...

Expected behavior

A clear and concise description of what you expected to happen.

patchelf --version output: patchelf 0.18.0

Additional context: Debian GNU/Linux trixie/sid x86_64

Add any other context about the problem here.

tesuji avatar Jan 23 '25 03:01 tesuji