martin@martin-Terra-PC-Gamer-6100:~/git/Lizarx$ readelf -a src/usr/tst2/foo.o ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: REL (Relocatable file) Machine: Advanced Micro Devices X86-64 Version: 0x1 Entry point address: 0x0 Start of program headers: 0 (bytes into file) Start of section headers: 424 (bytes into file) Flags: 0x0 Size of this header: 64 (bytes) Size of program headers: 0 (bytes) Number of program headers: 0 Size of section headers: 64 (bytes) Number of section headers: 11 Section header string table index: 8 Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .text PROGBITS 0000000000000000 00000040 0000000000000078 0000000000000000 AX 0 0 4 [ 2] .rela.text RELA 0000000000000000 00000610 00000000000000a8 0000000000000018 9 1 8 [ 3] .data PROGBITS 0000000000000000 000000c0 0000000000000027 0000000000000000 WA 0 0 16 [ 4] .bss NOBITS 0000000000000000 000000e8 0000000000000000 0000000000000000 WA 0 0 4 [ 5] .comment PROGBITS 0000000000000000 000000e8 0000000000000012 0000000000000001 MS 0 0 1 [ 6] .eh_frame PROGBITS 0000000000000000 00000100 0000000000000058 0000000000000000 A 0 0 8 [ 7] .rela.eh_frame RELA 0000000000000000 000006b8 0000000000000030 0000000000000018 9 6 8 [ 8] .shstrtab STRTAB 0000000000000000 00000158 0000000000000049 0000000000000000 0 0 1 [ 9] .symtab SYMTAB 0000000000000000 00000468 0000000000000150 0000000000000018 10 7 8 [10] .strtab STRTAB 0000000000000000 000005b8 0000000000000055 0000000000000000 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings), l (large) I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) There are no section groups in this file. There are no program headers in this file. Relocation section '.rela.text' at offset 0x610 contains 7 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000000007 000700000009 R_X86_64_GOTPCREL 0000000000000000 i - 4 000000000015 000b00000004 R_X86_64_PLT32 0000000000000000 _Z4itoajj - 4 000000000022 000c00000004 R_X86_64_PLT32 0000000000000000 _Z7uprintfPcz - 4 000000000029 000800000009 R_X86_64_GOTPCREL 0000000000000010 hello_shared - 4 000000000036 000c00000004 R_X86_64_PLT32 0000000000000000 _Z7uprintfPcz - 4 00000000003b 000d00000004 R_X86_64_PLT32 0000000000000041 _Z4foo2v - 4 000000000072 000c00000004 R_X86_64_PLT32 0000000000000000 _Z7uprintfPcz - 4 Relocation section '.rela.eh_frame' at offset 0x6b8 contains 2 entries: Offset Info Type Sym. Value Sym. Name + Addend 000000000020 000200000002 R_X86_64_PC32 0000000000000000 .text + 0 000000000040 000200000002 R_X86_64_PC32 0000000000000000 .text + 41 The decoding of unwind sections for machine type Advanced Micro Devices X86-64 is not currently supported. Symbol table '.symtab' contains 14 entries: Num: Value Size Type Bind Vis Ndx Name 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND 1: 0000000000000000 0 FILE LOCAL DEFAULT ABS foo.c 2: 0000000000000000 0 SECTION LOCAL DEFAULT 1 3: 0000000000000000 0 SECTION LOCAL DEFAULT 3 4: 0000000000000000 0 SECTION LOCAL DEFAULT 4 5: 0000000000000000 0 SECTION LOCAL DEFAULT 6 6: 0000000000000000 0 SECTION LOCAL DEFAULT 5 7: 0000000000000000 4 OBJECT GLOBAL DEFAULT 3 i 8: 0000000000000010 23 OBJECT GLOBAL DEFAULT 3 hello_shared 9: 0000000000000000 65 FUNC GLOBAL DEFAULT 1 _Z3foov 10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _GLOBAL_OFFSET_TABLE_ 11: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _Z4itoajj 12: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND _Z7uprintfPcz 13: 0000000000000041 55 FUNC GLOBAL DEFAULT 1 _Z4foo2v No version information found in this file. martin@martin-Terra-PC-Gamer-6100:~/git/Lizarx$ objdump -d src/usr/tst2/foo.o src/usr/tst2/foo.o: file format elf64-x86-64 Disassembly of section .text: 0000000000000000 <_Z3foov>: 0: 55 push %rbp 1: 48 89 e5 mov %rsp,%rbp 4: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # b <_Z3foov+0xb> b: 8b 00 mov (%rax),%eax d: be 10 00 00 00 mov $0x10,%esi 12: 89 c7 mov %eax,%edi 14: e8 00 00 00 00 callq 19 <_Z3foov+0x19> 19: 48 89 c7 mov %rax,%rdi 1c: b8 00 00 00 00 mov $0x0,%eax 21: e8 00 00 00 00 callq 26 <_Z3foov+0x26> 26: 48 8b 05 00 00 00 00 mov 0x0(%rip),%rax # 2d <_Z3foov+0x2d> 2d: 48 89 c7 mov %rax,%rdi 30: b8 00 00 00 00 mov $0x0,%eax 35: e8 00 00 00 00 callq 3a <_Z3foov+0x3a> 3a: e8 00 00 00 00 callq 3f <_Z3foov+0x3f> 3f: 5d pop %rbp 40: c3 retq 0000000000000041 <_Z4foo2v>: 41: 55 push %rbp 42: 48 89 e5 mov %rsp,%rbp 45: 48 83 ec 10 sub $0x10,%rsp 49: 48 b8 68 65 6c 6c 6f movabs $0x6873206f6c6c6568,%rax 50: 20 73 68 53: 48 89 45 f0 mov %rax,-0x10(%rbp) 57: 48 b8 61 72 65 64 20 movabs $0xa322064657261,%rax 5e: 32 0a 00 61: 48 89 45 f8 mov %rax,-0x8(%rbp) 65: 48 8d 45 f0 lea -0x10(%rbp),%rax 69: 48 89 c7 mov %rax,%rdi 6c: b8 00 00 00 00 mov $0x0,%eax 71: e8 00 00 00 00 callq 76 <_Z4foo2v+0x35> 76: c9 leaveq 77: c3 retq martin@martin-Terra-PC-Gamer-6100:~/git/Lizarx$ hexdump -d src/usr/tst2/foo.o 0000000 17791 17996 00258 00001 00000 00000 00000 00000 0000010 00001 00062 00001 00000 00000 00000 00000 00000 0000020 00000 00000 00000 00000 00424 00000 00000 00000 0000030 00000 00000 00064 00000 00000 00064 00011 00008 0000040 18517 58761 35656 00005 00000 35584 48640 00016 0000050 00000 51081 00232 00000 18432 51081 00184 00000 0000060 59392 00000 00000 35656 00005 00000 18432 51081 0000070 00184 00000 59392 00000 00000 00232 00000 23808 0000080 21955 35144 18661 60547 18448 26808 27749 28524 0000090 29472 18536 17801 18672 25016 25970 08292 02610 00000a0 18432 17801 18680 17805 18672 51081 00184 00000 00000b0 59392 00000 00000 50121 00000 00000 00000 00000 00000c0 00002 00000 00000 00000 00000 00000 00000 00000 00000d0 25960 27756 08303 26739 29281 25701 29216 27749 00000e0 24943 25956 02660 00000 18176 17219 08250 18216 00000f0 21838 08233 11828 11832 00049 00000 00000 00000 0000100 00020 00000 00000 00000 31233 00082 30721 00272 0000110 03099 02055 00400 00000 00028 00000 00028 00000 0000120 00000 00000 00065 00000 16640 04110 00646 03395 0000130 31750 01804 00008 00000 00028 00000 00060 00000 0000140 00000 00000 00055 00000 16640 04110 00646 03395 0000150 29190 01804 00008 00000 11776 31091 29805 25185 0000160 11776 29811 29810 25185 11776 26739 29811 29810 0000170 25185 11776 25970 24940 29742 30821 00116 25646 0000180 29793 00097 25134 29555 11776 28515 28013 28261 0000190 00116 29230 27749 11873 26725 26207 24946 25965 00001a0 00000 00000 00000 00000 00000 00000 00000 00000 * 00001e0 00000 00000 00000 00000 00032 00000 00001 00000 00001f0 00006 00000 00000 00000 00000 00000 00000 00000 0000200 00064 00000 00000 00000 00120 00000 00000 00000 0000210 00000 00000 00000 00000 00004 00000 00000 00000 0000220 00000 00000 00000 00000 00027 00000 00004 00000 0000230 00000 00000 00000 00000 00000 00000 00000 00000 0000240 01552 00000 00000 00000 00168 00000 00000 00000 0000250 00009 00000 00001 00000 00008 00000 00000 00000 0000260 00024 00000 00000 00000 00038 00000 00001 00000 0000270 00003 00000 00000 00000 00000 00000 00000 00000 0000280 00192 00000 00000 00000 00039 00000 00000 00000 0000290 00000 00000 00000 00000 00016 00000 00000 00000 00002a0 00000 00000 00000 00000 00044 00000 00008 00000 00002b0 00003 00000 00000 00000 00000 00000 00000 00000 00002c0 00232 00000 00000 00000 00000 00000 00000 00000 00002d0 00000 00000 00000 00000 00004 00000 00000 00000 00002e0 00000 00000 00000 00000 00049 00000 00001 00000 00002f0 00048 00000 00000 00000 00000 00000 00000 00000 0000300 00232 00000 00000 00000 00018 00000 00000 00000 0000310 00000 00000 00000 00000 00001 00000 00000 00000 0000320 00001 00000 00000 00000 00063 00000 00001 00000 0000330 00002 00000 00000 00000 00000 00000 00000 00000 0000340 00256 00000 00000 00000 00088 00000 00000 00000 0000350 00000 00000 00000 00000 00008 00000 00000 00000 0000360 00000 00000 00000 00000 00058 00000 00004 00000 0000370 00000 00000 00000 00000 00000 00000 00000 00000 0000380 01720 00000 00000 00000 00048 00000 00000 00000 0000390 00009 00000 00006 00000 00008 00000 00000 00000 00003a0 00024 00000 00000 00000 00017 00000 00003 00000 00003b0 00000 00000 00000 00000 00000 00000 00000 00000 00003c0 00344 00000 00000 00000 00073 00000 00000 00000 00003d0 00000 00000 00000 00000 00001 00000 00000 00000 00003e0 00000 00000 00000 00000 00001 00000 00002 00000 00003f0 00000 00000 00000 00000 00000 00000 00000 00000 0000400 01128 00000 00000 00000 00336 00000 00000 00000 0000410 00010 00000 00007 00000 00008 00000 00000 00000 0000420 00024 00000 00000 00000 00009 00000 00003 00000 0000430 00000 00000 00000 00000 00000 00000 00000 00000 0000440 01464 00000 00000 00000 00085 00000 00000 00000 0000450 00000 00000 00000 00000 00001 00000 00000 00000 0000460 00000 00000 00000 00000 00000 00000 00000 00000 * 0000480 00001 00000 00004 65521 00000 00000 00000 00000 0000490 00000 00000 00000 00000 00000 00000 00003 00001 00004a0 00000 00000 00000 00000 00000 00000 00000 00000 00004b0 00000 00000 00003 00003 00000 00000 00000 00000 00004c0 00000 00000 00000 00000 00000 00000 00003 00004 00004d0 00000 00000 00000 00000 00000 00000 00000 00000 00004e0 00000 00000 00003 00006 00000 00000 00000 00000 00004f0 00000 00000 00000 00000 00000 00000 00003 00005 0000500 00000 00000 00000 00000 00000 00000 00000 00000 0000510 00007 00000 00017 00003 00000 00000 00000 00000 0000520 00004 00000 00000 00000 00009 00000 00017 00003 0000530 00016 00000 00000 00000 00023 00000 00000 00000 0000540 00022 00000 00018 00001 00000 00000 00000 00000 0000550 00065 00000 00000 00000 00030 00000 00016 00000 0000560 00000 00000 00000 00000 00000 00000 00000 00000 0000570 00052 00000 00016 00000 00000 00000 00000 00000 0000580 00000 00000 00000 00000 00062 00000 00016 00000 0000590 00000 00000 00000 00000 00000 00000 00000 00000 00005a0 00076 00000 00018 00001 00065 00000 00000 00000 00005b0 00055 00000 00000 00000 26112 28527 25390 26880 00005c0 26624 27749 28524 29535 24936 25970 00100 23135 00005d0 26163 28527 00118 18271 20300 16706 24396 17999 00005e0 21318 21573 21599 16961 17740 00095 23135 26932 00005f0 28532 27233 00106 23135 30007 29296 28265 26228 0000600 25424 00122 23135 26164 28527 30258 00000 00000 0000610 00007 00000 00000 00000 00009 00000 00007 00000 0000620 65532 65535 65535 65535 00021 00000 00000 00000 0000630 00004 00000 00011 00000 65532 65535 65535 65535 0000640 00034 00000 00000 00000 00004 00000 00012 00000 0000650 65532 65535 65535 65535 00041 00000 00000 00000 0000660 00009 00000 00008 00000 65532 65535 65535 65535 0000670 00054 00000 00000 00000 00004 00000 00012 00000 0000680 65532 65535 65535 65535 00059 00000 00000 00000 0000690 00004 00000 00013 00000 65532 65535 65535 65535 00006a0 00114 00000 00000 00000 00004 00000 00012 00000 00006b0 65532 65535 65535 65535 00032 00000 00000 00000 00006c0 00002 00000 00002 00000 00000 00000 00000 00000 00006d0 00064 00000 00000 00000 00002 00000 00002 00000 00006e0 00065 00000 00000 00000 00006e8