Guest User

Untitled

a guest
Jan 30th, 2022
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. $ echo "int foo; int main() { return 0;}" | clang -xc - -o test-gold -fuse-ld=gold
  2.  
  3. $ readelf -Wl test-gold
  4.  
  5. Elf file type is EXEC (Executable file)
  6. Entry point 0x4004a0
  7. There are 10 program headers, starting at offset 64
  8.  
  9. Program Headers:
  10. Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
  11. PHDR 0x000040 0x0000000000400040 0x0000000000400040 0x000230 0x000230 R 0x8
  12. INTERP 0x000270 0x0000000000400270 0x0000000000400270 0x00001c 0x00001c R 0x1
  13. [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
  14. LOAD 0x000000 0x0000000000400000 0x0000000000400000 0x000730 0x000730 R E 0x1000
  15. LOAD 0x000e18 0x0000000000401e18 0x0000000000401e18 0x0001f8 0x000200 RW 0x1000
  16. DYNAMIC 0x000e28 0x0000000000401e28 0x0000000000401e28 0x0001b0 0x0001b0 RW 0x8
  17. NOTE 0x0002b0 0x00000000004002b0 0x00000000004002b0 0x000020 0x000020 R 0x8
  18. NOTE 0x00028c 0x000000000040028c 0x000000000040028c 0x000068 0x000068 R 0x4
  19. GNU_EH_FRAME 0x0006fc 0x00000000004006fc 0x00000000004006fc 0x000034 0x000034 R 0x4
  20. GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RW 0x10
  21. GNU_RELRO 0x000e18 0x0000000000401e18 0x0000000000401e18 0x0001e8 0x0001e8 RW 0x8
  22.  
  23. Section to Segment mapping:
  24. Segment Sections...
  25. 00
  26. 01 .interp
  27. 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
  28. 03 .fini_array .init_array .dynamic .got .got.plt .data .bss
  29. 04 .dynamic
  30. 05 .note.gnu.property
  31. 06 .note.ABI-tag .note.gnu.property .note.gnu.build-id
  32. 07 .eh_frame_hdr
  33. 08
  34. 09 .fini_array .init_array .dynamic .got .got.plt
Advertisement
Add Comment
Please, Sign In to add comment