[<<][arm][>>][..]
Thu Jun 23 21:31:46 CEST 2011

ARM ELF Entry point

It looks like load sets the entry point.  I.e. for my app the PC is
set to 0x110040.  Where is that data stored?  Using readelf it can be
retrieved:

$ arm-eabi-readelf -h <elf>
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:                           ARM
  Version:                           0x1
  Entry point address:               0x110040
  Start of program headers:          52 (bytes into file)
  Start of section headers:          981516 (bytes into file)
  Flags:                             0x4000002, has entry point, Version4 EABI
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         2
  Size of section headers:           40 (bytes)
  Number of section headers:         21
  Section header string table index: 18

According to [1] it's at the start of the file even:

$ hd example-format |head -n 2
00000000  7f 45 4c 46 01 01 01 00  00 00 00 00 00 00 00 00  |.ELF............|
00000010  02 00 28 00 01 00 00 00  40 00 11 00 34 00 00 00  |..(.....@...4...|
                                   ^^^^^^^^^^^

[1] http://vx.netlux.org/lib/static/vdat/tuunix02.htm


[Reply][About]
[<<][arm][>>][..]