'ELF label address

I have the following code in .s file:

pushq $afterjmp
    nop
afterjmp:
    movl %eax, %edx

Its object file has the following:

20: 68 00 00 00 00          pushq  $0x0
25: 90                      nop
0000000000000026 <afterjmp>:
26: 89 c2                   mov    %eax,%edx

After linking, it becomes:

400572: 68 78 05 40 00          pushq  $0x400578
400577: 90                      nop
400578: 89 c2                   mov    %eax,%edx

How does the argument 0x0 to pushq at byte 20 of the object file gets converted to 0x400578 in the final executable?

Which section of the object file contains this information?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source