Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ echo "int foo; int main() { return 0;}" | clang -xc - -o test-gold -fuse-ld=gold
- $ readelf -Wl test-gold
- Elf file type is EXEC (Executable file)
- Entry point 0x4004a0
- There are 10 program headers, starting at offset 64
- Program Headers:
- Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
- PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000230 0x000230 R 0x8
- INTERP 0x000270 0x0000000000400270 0x0000000000400270 0x00001c 0x00001c R 0x1
- [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
- LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x000730 0x000730 R E 0x1000
- LOAD 0x000e18 0x0000000000401e18 0x0000000000401e18 0x0001f8 0x000200 RW 0x1000
- DYNAMIC 0x000e28 0x0000000000401e28 0x0000000000401e28 0x0001b0 0x0001b0 RW 0x8
- NOTE 0x0002b0 0x00000000004002b0 0x00000000004002b0 0x000020 0x000020 R 0x8
- NOTE 0x00028c 0x000000000040028c 0x000000000040028c 0x000068 0x000068 R 0x4
- GNU_EH_FRAME 0x0006fc 0x00000000004006fc 0x00000000004006fc 0x000034 0x000034 R 0x4
- GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10
- GNU_RELRO 0x000e18 0x0000000000401e18 0x0000000000401e18 0x0001e8 0x0001e8 RW 0x8
- Section to Segment mapping:
- Segment Sections...
- 00
- 01 .interp
- 02 .interp .note.ABI-tag .note.gnu.property .note.gnu.build-id .dynsym .dynstr .gnu.hash .hash .gnu.version .gnu.version_r .rela.dyn .init .text .fini .rodata .eh_frame .eh_frame_hdr
- 03 .fini_array .init_array .dynamic .got .got.plt .data .bss
- 04 .dynamic
- 05 .note.gnu.property
- 06 .note.ABI-tag .note.gnu.property .note.gnu.build-id
- 07 .eh_frame_hdr
- 08
- 09 .fini_array .init_array .dynamic .got .got.plt
Advertisement
Add Comment
Please, Sign In to add comment