bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/2257] objdump can't recognize CISCO ELF


From: nickc at redhat dot com
Subject: [Bug binutils/2257] objdump can't recognize CISCO ELF
Date: 1 Mar 2006 13:33:43 -0000

------- Additional Comments From nickc at redhat dot com  2006-03-01 13:33 
-------
Hi Alec,

  Please could you try the uploaded patch.

  The problem is that the binary you have is corrupt.  The e_shstrndx field in
the ELF header is wrong.  It says that the string table is held in section 8,
but there is no section 8 in the object file!

  The patch updates the BFD library so that it can cope more gracefully with
this sort of broken binary, and it also updates readelf to detect this kind of
error and report it to the user.  With the patch applied I get this result from
running "objdump -p" on your test file:

  BFD: warning: C3640-IS.BIN has a corrupt string table index - ignoring
  C3640-IS.BIN:     file format elf32-big
  Program Header:
    LOAD off    0x000000f4 vaddr 0x80008000 paddr 0x80008000 align 2**7
         filesz 0x00d7e8e0 memsz 0x00e664c0 flags rwx

and this result from running "readelf -h -S":

  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:                           <unknown>: 1e
  Version:                           0x1
  Entry point address:               0x80008000
  Start of program headers:          52 (bytes into file)
  Start of section headers:          84 (bytes into file)
  Flags:                             0x10000001
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         1
  Size of section headers:           40 (bytes)
  Number of section headers:         4
  Section header string table index: 8 <corrupt: out of range>

  Section Headers:
  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
  [ 0] <no-name>         PROGBITS        80008000 0000f4 9a2000 00  AX  0   0 64
  [ 1] <no-name>         PROGBITS        809aa000 9a20f4 390e20 00   A  0   0  8
  [ 2] <no-name>         PROGBITS        80d3ae20 d32f14 044f00 00  WA  0   0  8
  [ 3] <no-name>         PROGBITS        80d7fd20 d77e14 006bc0 

Note - do you know what type of architecture the 0x1e value in the e_machine
field of the ELF header represents ?  If so we could add it to the list of known
values so that readelf can identify it.

Cheers
  Nick


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING


http://sourceware.org/bugzilla/show_bug.cgi?id=2257

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]