AppleGrew
AppleGrew

Reputation: 9578

What does the first column of numbers mean in objdump output?

I used objdump -d a.out to get the following. I initially assumed that the first column (e.g. 080482b4) is the byte offset, but then I noticed that the file is only 7190 bytes long!

a.out:     file format elf32-i386


Disassembly of section .init:

080482b4 <_init>:
 80482b4:   53                      push   %ebx
 80482b5:   83 ec 08                sub    $0x8,%esp
 80482b8:   e8 00 00 00 00          call   80482bd <_init+0x9>
 80482bd:   5b                      pop    %ebx
 80482be:   81 c3 37 1d 00 00       add    $0x1d37,%ebx
 80482c4:   8b 83 fc ff ff ff       mov    -0x4(%ebx),%eax
 80482ca:   85 c0                   test   %eax,%eax
 80482cc:   74 05                   je     80482d3 <_init+0x1f>
 80482ce:   e8 3d 00 00 00          call   8048310 <__gmon_start__@plt>
 80482d3:   e8 e8 00 00 00          call   80483c0 <frame_dummy>
 80482d8:   e8 b3 01 00 00          call   8048490 <__do_global_ctors_aux>
 80482dd:   83 c4 08                add    $0x8,%esp
 80482e0:   5b                      pop    %ebx
 80482e1:   c3                      ret    

Upvotes: 0

Views: 1213

Answers (1)

Matthew Slattery
Matthew Slattery

Reputation: 47068

It shows the virtual address where the code will be in the running image.

(By convention, code in Linux x86 ELF binaries typically starts at 0x08048000.)

Upvotes: 4

Related Questions