[coreboot] Extracting an image created with mkelfImage

Brian Luckau bluckau at sgi.com
Mon Jan 9 23:00:42 CET 2012


I'm not sure if I'm using the correct paramters but here is some of the information you requested.

# objdump -x -s -D Compute.ebi 

Compute.ebi:     file format elf32-i386
architecture: i386, flags 0x00000102:
start address 0x00010000

Program Header:
    NOTE off    0x000000d4 vaddr 0x00000000 paddr 0x00000000 align 2**0
         filesz 0x000000a4 memsz 0x000000a4 flags rwx
    LOAD off    0x00000178 vaddr 0x00010000 paddr 0x00010000 align 2**0
         filesz 0x00001288 memsz 0x00005524 flags rwx
    LOAD off    0x00001400 vaddr 0x00020000 paddr 0x00020000 align 2**0
         filesz 0x00000000 memsz 0x00001070 flags rwx
    LOAD off    0x00001400 vaddr 0x00100000 paddr 0x00100000 align 2**0
         filesz 0x0020029c memsz 0x00700000 flags rwx
    LOAD off    0x0020169c vaddr 0x02800000 paddr 0x02800000 align 2**0
         filesz 0x007dbdc6 memsz 0x007dbdc6 flags rwx

Idx Name          Size      VMA       LMA       File off  Algn
no symbols

root at admin cache]# readelf -a Compute.ebi 
ELF Header:
  Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, little endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           Intel 80386
  Version:                           0x1
  Entry point address:               0x10000
  Start of program headers:          52 (bytes into file)
  Start of section headers:          0 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         5
  Size of section headers:           0 (bytes)
  Number of section headers:         0
  Section header string table index: 0

There are no sections in this file.

There are no sections in this file.

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  NOTE           0x0000d4 0x00000000 0x00000000 0x000a4 0x000a4 RWE 0
  LOAD           0x000178 0x00010000 0x00010000 0x01288 0x05524 RWE 0
  LOAD           0x001400 0x00020000 0x00020000 0x00000 0x01070 RWE 0
  LOAD           0x001400 0x00100000 0x00100000 0x20029c 0x700000 RWE 0
  LOAD           0x20169c 0x02800000 0x02800000 0x7dbdc6 0x7dbdc6 RWE 0

There is no dynamic section in this file.

There are no relocations in this file.

There are no unwind sections in this file.

No version information found in this file.
From: coreboot-bounces at coreboot.org [coreboot-bounces at coreboot.org] on behalf of Peter Stuge [peter at stuge.se]
Sent: Monday, January 09, 2012 2:30 PM
To: coreboot at coreboot.org
Subject: Re: [coreboot] Extracting an image created with mkelfImage

Hi Brian,

Brian Luckau wrote:
> I have an elf netowrk bootable image for linux that was created
> with mkelfImage.  How can I extract the file to view its contents
> (which kernel modules were included in the file, etc. )

The image may or may not include initrd, if yes it will quite likely
be compressed. What does readelf and/or objdump say about the file?

There's no pre-made tool for taking apart those ELF images. You can
of course always peruse the mkelfImage source code to find out all

svn co svn://coreboot.org/coreboot/trunk/util/mkelfImage


coreboot mailing list: coreboot at coreboot.org

More information about the coreboot mailing list