Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamically linked uClibc MIPS binaries are not recognized, missing section headers? #569

Open
jschwartzenberg opened this issue Nov 3, 2024 · 0 comments
Labels

Comments

@jschwartzenberg
Copy link

Describe the bug

I am trying to patch binaries that show the following when ran through file:

ELF 32-bit MSB shared object, MIPS, MIPS32 rel2 version 1 (SYSV), dynamically linked, interpreter /lib/ld-uClibc.so.0, no section header

But patchelf shows me:

patchelf: no section headers. The input file is probably a statically linked, self-decompressing binary

Steps To Reproduce

Example binary: curl.gz
Running file or patchelf against it will give the messages as shown above.

Expected behavior

I am hoping that there is still a way to change the loader and the libraries that it's looking for.

patchelf --version output

I tested with the version from my distro and the latest Git:

$ patchelf --version
patchelf 0.14.3
$ ./src/patchelf --version
patchelf 0.18.0

Additional context

These binaries are coming from this firmware, that I extracted with binwalk -e:
https://www.devolo.nl/fileadmin/Web-Content/DE/products/hnw/magic-2-wifi/firmware/delos_magic-2-wifi-v1_6.0.1_2023-09-06.bin

I managed to successfully patch and reuse binaries for the ARM version of this device on modern OpenWRT, but trying to do the same with the MIPS version, I'm running into the problem that the binaries are not recognized.

Many thanks in advance for any help or advice!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant