I have a binary (compiled with gcc) with corrupted elf headers.
The file utility shows the following information:
Code:
mybinary: ERROR: ELF 64-bit LSB executable, x86-64, invalid version (SYSV), dynamically linked (uses shared libs)error reading (Invalid argument)
readelf -h ./mybinary shows this at the end of the output:
Code:
readelf: Error: Unable to seek to 0xffffff60e9000000 for string table
readelf: Error: Section 8 has invalid sh_entsize 6c2f343662696c2f (expected 18)
readelf: Error: Section 23 has invalid sh_entsize 0 (expected 10)
readelf: Error: no .dynamic section in the dynamic segment
What can I do to fix this binary? I can not run a file with broken elf headers in gdb for example.