0

info on the file it is called ld it is a command for linking elfs called link editor. Does Error: Reading 0x1b50 bytes extends past end of file for string table mean I am missing some kind of offset? readelf says: readelf: Error: no .dynamic section in the dynamic segment strange here is all the readelf info:

~/Desktop/ld$ eu-readelf --all ./ld
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00
  Class:                             ELF32
  Data:                              2's complement, big endian
  Ident Version:                     1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           MIPS
  Version:                           1 (current)
  Entry point address:               0x10002350
  Start of program headers:          52 (bytes into file)
  Start of section headers:          91924 (bytes into file)
  Flags:                             0x20000024
  Size of this header:               52 (bytes)
  Size of program header entries:    32 (bytes)
  Number of program headers entries: 7
  Size of section header entries:    40 (bytes)
  Number of section headers entries: 23
  Section header string table index: 22

Section Headers:
[Nr] Name                 Type         Addr     Off    Size   ES Flags Lk Inf Al
[ 0] <corrupt>            <unknown>: 1090519040 001cffff ffff0100 4fcffff 1090519040       -1 -65216 155197191
[ 1] <corrupt>            <unknown>: 1638399 04fcffff ffffffff ffff0140 454561792 NOE   155197191 1090519040 1048576
[ 2] <corrupt>            <unknown>: 47451165 696e7465 7270002e 4d495053 1734962790 AXS   779055220 1768910451 3043941
[ 3] <corrupt>            SHT_LOPROC+96e616d 6c69626c 69737400 2e64796e 2037281657 AXSO  1937011200 778592627 1744842340
[ 4] <corrupt>            <unknown>: 1230000942 6962002e 6d73796d 2e636f 779318389 XSINTCO 1852206185 1668546606 1296650323
[ 5] <corrupt>            SHT_LOPROC+4657874 6974002e 726f6461 7461002e 1651733248 AXSINC 1684108385 3041135 1946168947
[ 6] <corrupt>            SHT_LOOS+1746100 002e6465 6275675f 6c696e65 1634559347 WAMSING 3040357 1651861343 1886741102
[ 7] <corrupt>            SHT_LOOS+275675f 6576002e 64656275 675f696e 1634559232 AMSIGO 1718550574 1684365941 1734305394
[ 8] <corrupt>            SHT_LOPROC+5675f77 616d6573 2e6465 6275675f 1700951399 AXSINGCO 1718972003 1851878757 1929391716
[ 9] <corrupt>            SHT_LOOS+e676573 6d6d656e 74002e4d 4950532e 1296650323 WAXSING 1768846437 1919312227 1702035502
[10] <corrupt>            SHT_LOOS+e74732e 002e4d49 50532e65 76656e74 778268526 XMSICO 1932421486 1769209902 1296650323
[11] <corrupt>            <unknown>: 779251556 2e4d4950 532e636f 6e74656e 1920229730 NO    1949197409 1952514094 1936225140
[12] <corrupt>            NULL         00000000 000000 000000  0        0   0  0
[13] <corrupt>            <unknown>: 256 00000210 011400 011400 1024 N     5376   0  0
[14] <corrupt>            <unknown>: 2416 00000210 013000 013000 2048 NTC   32768   0  0
[15] <corrupt>            <unknown>: 6000 00000210 01b000 01b000 1024 GT    6144   0  0
[16] <corrupt>            <unknown>: 8192 00000210 01c800 01c800 1024 GT    73728 1536  0
[17] <corrupt>            <unknown>: 10608 00000210 02e800 02e800 1024       5120 1536 256
[18] <corrupt>            <unknown>: 12800 00000210 02fc00 02fc00 1024 NG    453376   0  0
[19] <corrupt>            <unknown>: 14848 00000210 09e800 09e800 1024 NT    431104 2048  0
[20] <corrupt>            <unknown>: 16384 00000210 107c00 107c00  4 NGC   854576   6 16
[21] <corrupt>            <unknown>: 72 00000002 10001aac 001aac  1 SO    163   8  5
[22] <corrupt>            <unknown>: 85 00000002 10001b50 001b50  4 WO    1304   6  0

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz  MemSiz   Flg Align
  PHDR           0x000034 0x10000034 0x10000034 0x0000e0 0x0000e0 R   0x4
  INTERP         0x000114 0x10000114 0x10000114 0x000015 0x000015 R   0x4
  LOPROC+2       0x000130 0x10000130 0x10000130 0x000080 0x000080 R   0x8
  LOPROC+0       0x0001b0 0x100001b0 0x100001b0 0x000018 0x000018 R   0x4
  DYNAMIC        0x0001c8 0x100001c8 0x100001c8 0x000120 0x000120 R   0x4
  LOAD           0x000000 0x10000000 0x10000000 0x012cd8 0x012cd8 R E 0x10000
  LOAD           0x014000 0x10014000 0x10014000 0x000d0a 0x4300000c     0x6000040

 Section to Segment mapping:
  Segment Sections...
   00     
   01     
   02     
   03     
   04     
   05     
   06     
b@b:~/Desktop/ld$ readelf -h ./ld
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           MIPS R3000
  Version:                           0x1
  Entry point address:               0x10002350
  Start of program headers:          52 (bytes into file)
  Start of section headers:          91924 (bytes into file)
  Flags:                             0x20000024, cpic, abi2, mips3
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         7
  Size of section headers:           40 (bytes)
  Number of section headers:         23
  Section header string table index: 22
readelf: Error: Reading 0x1b50 bytes extends past end of file for string table
readelf: Error: no .dynamic section in the dynamic segment

Maybe readelf is the incorrect thing to use for this but ghidra also doesnt load much of anything so I need more info to load it as a raw binary.

its stripped to this sounds like fun: ./ld: ELF 32-bit MSB executable, MIPS, N32 MIPS-III version 1 (SYSV), dynamically linked, interpreter empty, stripped aka difficult

8
  • 2
    please use code blocks for formatting, what you have now is pretty much unreadable – Igor Skochinsky Apr 29 at 22:30
  • Totally agree with Igor. Please use punctuation and formatting. I'd wager the majority of our community are non-native speakers of English. I fixed what seemed to be one contiguous block meant to be the readelf output. If I got it wrong don't hesitate to fix it. – 0xC0000022L Apr 30 at 9:26
  • @IgorSkochinsky sorry about that it seemed correctly parsed before I posted thanks for letting e know – Peter Robertson Apr 30 at 23:42
  • The ELF header is likely corrupted. It will need to be repaired before tools like readelf or ghidra can parse it properly – julian May 3 at 0:02
  • 1
    @PeterRobertson If section information has been removed, then you can just zero out the ELF header fields that have to do with section information and ghidra will load the binary. Demo here (full disclosure: I’m the developer): github.com/BinaryResearch/lepton – julian May 3 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.