$ objdump -D -p --prefix-addresses
가 무난하려나..
Usage: objdump <option(s)> <file(s)> Display information from object <file(s)>. At least one of the following switches must be given: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the overall file header -p, --private-headers Display object format specific file header contents -P, --private=OPT,OPT... Display object format specific contents -h, --[section-]headers Display the contents of the section headers -x, --all-headers Display the contents of all headers -d, --disassemble Display assembler contents of executable sections -D, --disassemble-all Display assembler contents of all sections -S, --source Intermix source code with disassembly -s, --full-contents Display the full contents of all sections requested -g, --debugging Display debug information in object file -e, --debugging-tags Display debug information using ctags style -G, --stabs Display (in raw form) any STABS info in the file -W[lLiaprmfFsoRt] or --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames, =frames-interp,=str,=loc,=Ranges,=pubtypes, =gdb_index,=trace_info,=trace_abbrev,=trace_aranges] Display DWARF info in the file -t, --syms Display the contents of the symbol table(s) -T, --dynamic-syms Display the contents of the dynamic symbol table -r, --reloc Display the relocation entries in the file -R, --dynamic-reloc Display the dynamic relocation entries in the file @<file> Read options from <file> -v, --version Display this program's version number -i, --info List object formats and architectures supported -H, --help Display this information |
objdump [-a|--archive-headers] [-b bfdname|--target=bfdname] [-C|--demangle[=style] ] [-d|--disassemble] [-D|--disassemble-all] [-z|--disassemble-zeroes] [-EB|-EL|--endian={big | little }] [-f|--file-headers] [-F|--file-offsets] [--file-start-context] [-g|--debugging] [-e|--debugging-tags] [-h|--section-headers|--headers] [-i|--info] [-j section|--section=section] [-l|--line-numbers] [-S|--source] [-m machine|--architecture=machine] [-M options|--disassembler-options=options] [-p|--private-headers] [-P options|--private=options] [-r|--reloc] [-R|--dynamic-reloc] [-s|--full-contents] [-W[lLiaprmfFsoRt]| --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]] [-G|--stabs] [-t|--syms] [-T|--dynamic-syms] [-x|--all-headers] [-w|--wide] [--start-address=address] [--stop-address=address] [--prefix-addresses] [--[no-]show-raw-insn] [--adjust-vma=offset] [--special-syms] [--prefix=prefix] [--prefix-strip=level] [--insn-width=width] [-V|--version] [-H|--help] objfile... |
[링크 : http://sosal.kr/125]
[링크 : http://devanix.tistory.com/188]
[링크 : http://s3ize.blogspot.com/2012/08/tip-linux-objdump-command.html]
-x
--all-headers
Display all available header information, including the symbol table and relocation entries. Using -x is equivalent to specifying all of -a -f -h -p -r -t.
[링크 : http://linux.die.net/man/1/objdump]
+
$ gcc tttt.c $ objdump -x a.out a.out: file format elf64-x86-64 a.out architecture: i386:x86-64, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x0000000000400440 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3 filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x INTERP off 0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0 filesz 0x000000000000001c memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21 filesz 0x000000000000071c memsz 0x000000000000071c flags r-x LOAD off 0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**21 filesz 0x00000000000001f8 memsz 0x0000000000000208 flags rw- DYNAMIC off 0x0000000000000e50 vaddr 0x0000000000600e50 paddr 0x0000000000600e50 align 2**3 filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw- NOTE off 0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2 filesz 0x0000000000000044 memsz 0x0000000000000044 flags r-- EH_FRAME off 0x000000000000064c vaddr 0x000000000040064c paddr 0x000000000040064c align 2**2 filesz 0x000000000000002c memsz 0x000000000000002c flags r-- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- RELRO off 0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**0 filesz 0x00000000000001d8 memsz 0x00000000000001d8 flags r-- Dynamic Section: NEEDED libc.so.6 INIT 0x00000000004003f0 FINI 0x0000000000400638 GNU_HASH 0x0000000000400298 STRTAB 0x0000000000400318 SYMTAB 0x00000000004002b8 STRSZ 0x0000000000000053 SYMENT 0x0000000000000018 DEBUG 0x0000000000000000 PLTGOT 0x0000000000600fe8 PLTRELSZ 0x0000000000000030 PLTREL 0x0000000000000007 JMPREL 0x00000000004003c0 RELA 0x00000000004003a8 RELASZ 0x0000000000000018 RELAENT 0x0000000000000018 VERNEED 0x0000000000400378 VERNEEDNUM 0x0000000000000001 VERSYM 0x000000000040036c Version References: required from libc.so.6: 0x09691a75 0x00 03 GLIBC_2.2.5 0x0d696914 0x00 02 GLIBC_2.4 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 0000001c 0000000000400238 0000000000400238 00000238 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .note.ABI-tag 00000020 0000000000400254 0000000000400254 00000254 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .note.gnu.build-id 00000024 0000000000400274 0000000000400274 00000274 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .gnu.hash 0000001c 0000000000400298 0000000000400298 00000298 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .dynsym 00000060 00000000004002b8 00000000004002b8 000002b8 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .dynstr 00000053 0000000000400318 0000000000400318 00000318 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .gnu.version 00000008 000000000040036c 000000000040036c 0000036c 2**1 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .gnu.version_r 00000030 0000000000400378 0000000000400378 00000378 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .rela.dyn 00000018 00000000004003a8 00000000004003a8 000003a8 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .rela.plt 00000030 00000000004003c0 00000000004003c0 000003c0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 10 .init 00000018 00000000004003f0 00000000004003f0 000003f0 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 11 .plt 00000030 0000000000400410 0000000000400410 00000410 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 12 .text 000001f8 0000000000400440 0000000000400440 00000440 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 13 .fini 0000000e 0000000000400638 0000000000400638 00000638 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 14 .rodata 00000004 0000000000400648 0000000000400648 00000648 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 15 .eh_frame_hdr 0000002c 000000000040064c 000000000040064c 0000064c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 16 .eh_frame 000000a4 0000000000400678 0000000000400678 00000678 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 17 .ctors 00000010 0000000000600e28 0000000000600e28 00000e28 2**3 CONTENTS, ALLOC, LOAD, DATA 18 .dtors 00000010 0000000000600e38 0000000000600e38 00000e38 2**3 CONTENTS, ALLOC, LOAD, DATA 19 .jcr 00000008 0000000000600e48 0000000000600e48 00000e48 2**3 CONTENTS, ALLOC, LOAD, DATA 20 .dynamic 00000190 0000000000600e50 0000000000600e50 00000e50 2**3 CONTENTS, ALLOC, LOAD, DATA 21 .got 00000008 0000000000600fe0 0000000000600fe0 00000fe0 2**3 CONTENTS, ALLOC, LOAD, DATA 22 .got.plt 00000028 0000000000600fe8 0000000000600fe8 00000fe8 2**3 CONTENTS, ALLOC, LOAD, DATA 23 .data 00000010 0000000000601010 0000000000601010 00001010 2**3 CONTENTS, ALLOC, LOAD, DATA 24 .bss 00000010 0000000000601020 0000000000601020 00001020 2**3 ALLOC 25 .comment 0000002a 0000000000000000 0000000000000000 00001020 2**0 CONTENTS, READONLY SYMBOL TABLE: 0000000000400238 l d .interp 0000000000000000 .interp 0000000000400254 l d .note.ABI-tag 0000000000000000 .note.ABI-tag 0000000000400274 l d .note.gnu.build-id 0000000000000000 .note.gnu.build-id 0000000000400298 l d .gnu.hash 0000000000000000 .gnu.hash 00000000004002b8 l d .dynsym 0000000000000000 .dynsym 0000000000400318 l d .dynstr 0000000000000000 .dynstr 000000000040036c l d .gnu.version 0000000000000000 .gnu.version 0000000000400378 l d .gnu.version_r 0000000000000000 .gnu.version_r 00000000004003a8 l d .rela.dyn 0000000000000000 .rela.dyn 00000000004003c0 l d .rela.plt 0000000000000000 .rela.plt 00000000004003f0 l d .init 0000000000000000 .init 0000000000400410 l d .plt 0000000000000000 .plt 0000000000400440 l d .text 0000000000000000 .text 0000000000400638 l d .fini 0000000000000000 .fini 0000000000400648 l d .rodata 0000000000000000 .rodata 000000000040064c l d .eh_frame_hdr 0000000000000000 .eh_frame_hdr 0000000000400678 l d .eh_frame 0000000000000000 .eh_frame 0000000000600e28 l d .ctors 0000000000000000 .ctors 0000000000600e38 l d .dtors 0000000000000000 .dtors 0000000000600e48 l d .jcr 0000000000000000 .jcr 0000000000600e50 l d .dynamic 0000000000000000 .dynamic 0000000000600fe0 l d .got 0000000000000000 .got 0000000000600fe8 l d .got.plt 0000000000000000 .got.plt 0000000000601010 l d .data 0000000000000000 .data 0000000000601020 l d .bss 0000000000000000 .bss 0000000000000000 l d .comment 0000000000000000 .comment 000000000040046c l F .text 0000000000000000 call_gmon_start 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e28 l O .ctors 0000000000000000 __CTOR_LIST__ 0000000000600e38 l O .dtors 0000000000000000 __DTOR_LIST__ 0000000000600e48 l O .jcr 0000000000000000 __JCR_LIST__ 0000000000400490 l F .text 0000000000000000 __do_global_dtors_aux 0000000000601020 l O .bss 0000000000000001 completed.6531 0000000000601028 l O .bss 0000000000000008 dtor_idx.6533 0000000000400500 l F .text 0000000000000000 frame_dummy 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e30 l O .ctors 0000000000000000 __CTOR_END__ 0000000000400718 l O .eh_frame 0000000000000000 __FRAME_END__ 0000000000600e48 l O .jcr 0000000000000000 __JCR_END__ 0000000000400600 l F .text 0000000000000000 __do_global_ctors_aux 0000000000000000 l df *ABS* 0000000000000000 tttt.c 0000000000600e24 l .ctors 0000000000000000 __init_array_end 0000000000600e50 l O .dynamic 0000000000000000 _DYNAMIC 0000000000600e24 l .ctors 0000000000000000 __init_array_start 0000000000600fe8 l O .got.plt 0000000000000000 _GLOBAL_OFFSET_TABLE_ 00000000004005f0 g F .text 0000000000000002 __libc_csu_fini 0000000000601010 w .data 0000000000000000 data_start 0000000000601020 g *ABS* 0000000000000000 _edata 0000000000400638 g F .fini 0000000000000000 _fini 0000000000000000 F *UND* 0000000000000000 __stack_chk_fail@@GLIBC_2.4 0000000000600e40 g O .dtors 0000000000000000 .hidden __DTOR_END__ 0000000000000000 F *UND* 0000000000000000 __libc_start_main@@GLIBC_2.2.5 0000000000601010 g .data 0000000000000000 __data_start 0000000000000000 w *UND* 0000000000000000 __gmon_start__ 0000000000601018 g O .data 0000000000000000 .hidden __dso_handle 0000000000400648 g O .rodata 0000000000000004 _IO_stdin_used 0000000000400560 g F .text 0000000000000089 __libc_csu_init 0000000000601030 g *ABS* 0000000000000000 _end 0000000000400440 g F .text 0000000000000000 _start 0000000000601020 g *ABS* 0000000000000000 __bss_start 0000000000400524 g F .text 0000000000000036 main 0000000000000000 w *UND* 0000000000000000 _Jv_RegisterClasses 00000000004003f0 g F .init 0000000000000000 _init |
$ gcc -g tttt.c $ objdump -x a.out a.out: file format elf64-x86-64 a.out architecture: i386:x86-64, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x0000000000400440 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3 filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x INTERP off 0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0 filesz 0x000000000000001c memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21 filesz 0x000000000000071c memsz 0x000000000000071c flags r-x LOAD off 0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**21 filesz 0x00000000000001f8 memsz 0x0000000000000208 flags rw- DYNAMIC off 0x0000000000000e50 vaddr 0x0000000000600e50 paddr 0x0000000000600e50 align 2**3 filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw- NOTE off 0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2 filesz 0x0000000000000044 memsz 0x0000000000000044 flags r-- EH_FRAME off 0x000000000000064c vaddr 0x000000000040064c paddr 0x000000000040064c align 2**2 filesz 0x000000000000002c memsz 0x000000000000002c flags r-- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- RELRO off 0x0000000000000e28 vaddr 0x0000000000600e28 paddr 0x0000000000600e28 align 2**0 filesz 0x00000000000001d8 memsz 0x00000000000001d8 flags r-- Dynamic Section: NEEDED libc.so.6 INIT 0x00000000004003f0 FINI 0x0000000000400638 GNU_HASH 0x0000000000400298 STRTAB 0x0000000000400318 SYMTAB 0x00000000004002b8 STRSZ 0x0000000000000053 SYMENT 0x0000000000000018 DEBUG 0x0000000000000000 PLTGOT 0x0000000000600fe8 PLTRELSZ 0x0000000000000030 PLTREL 0x0000000000000007 JMPREL 0x00000000004003c0 RELA 0x00000000004003a8 RELASZ 0x0000000000000018 RELAENT 0x0000000000000018 VERNEED 0x0000000000400378 VERNEEDNUM 0x0000000000000001 VERSYM 0x000000000040036c Version References: required from libc.so.6: 0x09691a75 0x00 03 GLIBC_2.2.5 0x0d696914 0x00 02 GLIBC_2.4 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 0000001c 0000000000400238 0000000000400238 00000238 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .note.ABI-tag 00000020 0000000000400254 0000000000400254 00000254 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .note.gnu.build-id 00000024 0000000000400274 0000000000400274 00000274 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .gnu.hash 0000001c 0000000000400298 0000000000400298 00000298 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .dynsym 00000060 00000000004002b8 00000000004002b8 000002b8 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .dynstr 00000053 0000000000400318 0000000000400318 00000318 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .gnu.version 00000008 000000000040036c 000000000040036c 0000036c 2**1 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .gnu.version_r 00000030 0000000000400378 0000000000400378 00000378 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .rela.dyn 00000018 00000000004003a8 00000000004003a8 000003a8 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .rela.plt 00000030 00000000004003c0 00000000004003c0 000003c0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 10 .init 00000018 00000000004003f0 00000000004003f0 000003f0 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 11 .plt 00000030 0000000000400410 0000000000400410 00000410 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 12 .text 000001f8 0000000000400440 0000000000400440 00000440 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 13 .fini 0000000e 0000000000400638 0000000000400638 00000638 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 14 .rodata 00000004 0000000000400648 0000000000400648 00000648 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 15 .eh_frame_hdr 0000002c 000000000040064c 000000000040064c 0000064c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 16 .eh_frame 000000a4 0000000000400678 0000000000400678 00000678 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 17 .ctors 00000010 0000000000600e28 0000000000600e28 00000e28 2**3 CONTENTS, ALLOC, LOAD, DATA 18 .dtors 00000010 0000000000600e38 0000000000600e38 00000e38 2**3 CONTENTS, ALLOC, LOAD, DATA 19 .jcr 00000008 0000000000600e48 0000000000600e48 00000e48 2**3 CONTENTS, ALLOC, LOAD, DATA 20 .dynamic 00000190 0000000000600e50 0000000000600e50 00000e50 2**3 CONTENTS, ALLOC, LOAD, DATA 21 .got 00000008 0000000000600fe0 0000000000600fe0 00000fe0 2**3 CONTENTS, ALLOC, LOAD, DATA 22 .got.plt 00000028 0000000000600fe8 0000000000600fe8 00000fe8 2**3 CONTENTS, ALLOC, LOAD, DATA 23 .data 00000010 0000000000601010 0000000000601010 00001010 2**3 CONTENTS, ALLOC, LOAD, DATA 24 .bss 00000010 0000000000601020 0000000000601020 00001020 2**3 ALLOC 25 .comment 0000002a 0000000000000000 0000000000000000 00001020 2**0 CONTENTS, READONLY 26 .debug_aranges 00000030 0000000000000000 0000000000000000 0000104a 2**0 CONTENTS, READONLY, DEBUGGING 27 .debug_info 0000009d 0000000000000000 0000000000000000 0000107a 2**0 CONTENTS, READONLY, DEBUGGING 28 .debug_abbrev 0000006f 0000000000000000 0000000000000000 00001117 2**0 CONTENTS, READONLY, DEBUGGING 29 .debug_line 0000003c 0000000000000000 0000000000000000 00001186 2**0 CONTENTS, READONLY, DEBUGGING 30 .debug_str 0000004c 0000000000000000 0000000000000000 000011c2 2**0 CONTENTS, READONLY, DEBUGGING 31 .debug_loc 00000060 0000000000000000 0000000000000000 0000120e 2**0 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 0000000000400238 l d .interp 0000000000000000 .interp 0000000000400254 l d .note.ABI-tag 0000000000000000 .note.ABI-tag 0000000000400274 l d .note.gnu.build-id 0000000000000000 .note.gnu.build-id 0000000000400298 l d .gnu.hash 0000000000000000 .gnu.hash 00000000004002b8 l d .dynsym 0000000000000000 .dynsym 0000000000400318 l d .dynstr 0000000000000000 .dynstr 000000000040036c l d .gnu.version 0000000000000000 .gnu.version 0000000000400378 l d .gnu.version_r 0000000000000000 .gnu.version_r 00000000004003a8 l d .rela.dyn 0000000000000000 .rela.dyn 00000000004003c0 l d .rela.plt 0000000000000000 .rela.plt 00000000004003f0 l d .init 0000000000000000 .init 0000000000400410 l d .plt 0000000000000000 .plt 0000000000400440 l d .text 0000000000000000 .text 0000000000400638 l d .fini 0000000000000000 .fini 0000000000400648 l d .rodata 0000000000000000 .rodata 000000000040064c l d .eh_frame_hdr 0000000000000000 .eh_frame_hdr 0000000000400678 l d .eh_frame 0000000000000000 .eh_frame 0000000000600e28 l d .ctors 0000000000000000 .ctors 0000000000600e38 l d .dtors 0000000000000000 .dtors 0000000000600e48 l d .jcr 0000000000000000 .jcr 0000000000600e50 l d .dynamic 0000000000000000 .dynamic 0000000000600fe0 l d .got 0000000000000000 .got 0000000000600fe8 l d .got.plt 0000000000000000 .got.plt 0000000000601010 l d .data 0000000000000000 .data 0000000000601020 l d .bss 0000000000000000 .bss 0000000000000000 l d .comment 0000000000000000 .comment 0000000000000000 l d .debug_aranges 0000000000000000 .debug_aranges 0000000000000000 l d .debug_info 0000000000000000 .debug_info 0000000000000000 l d .debug_abbrev 0000000000000000 .debug_abbrev 0000000000000000 l d .debug_line 0000000000000000 .debug_line 0000000000000000 l d .debug_str 0000000000000000 .debug_str 0000000000000000 l d .debug_loc 0000000000000000 .debug_loc 000000000040046c l F .text 0000000000000000 call_gmon_start 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e28 l O .ctors 0000000000000000 __CTOR_LIST__ 0000000000600e38 l O .dtors 0000000000000000 __DTOR_LIST__ 0000000000600e48 l O .jcr 0000000000000000 __JCR_LIST__ 0000000000400490 l F .text 0000000000000000 __do_global_dtors_aux 0000000000601020 l O .bss 0000000000000001 completed.6531 0000000000601028 l O .bss 0000000000000008 dtor_idx.6533 0000000000400500 l F .text 0000000000000000 frame_dummy 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e30 l O .ctors 0000000000000000 __CTOR_END__ 0000000000400718 l O .eh_frame 0000000000000000 __FRAME_END__ 0000000000600e48 l O .jcr 0000000000000000 __JCR_END__ 0000000000400600 l F .text 0000000000000000 __do_global_ctors_aux 0000000000000000 l df *ABS* 0000000000000000 tttt.c 0000000000600e24 l .ctors 0000000000000000 __init_array_end 0000000000600e50 l O .dynamic 0000000000000000 _DYNAMIC 0000000000600e24 l .ctors 0000000000000000 __init_array_start 0000000000600fe8 l O .got.plt 0000000000000000 _GLOBAL_OFFSET_TABLE_ 00000000004005f0 g F .text 0000000000000002 __libc_csu_fini 0000000000601010 w .data 0000000000000000 data_start 0000000000601020 g *ABS* 0000000000000000 _edata 0000000000400638 g F .fini 0000000000000000 _fini 0000000000000000 F *UND* 0000000000000000 __stack_chk_fail@@GLIBC_2.4 0000000000600e40 g O .dtors 0000000000000000 .hidden __DTOR_END__ 0000000000000000 F *UND* 0000000000000000 __libc_start_main@@GLIBC_2.2.5 0000000000601010 g .data 0000000000000000 __data_start 0000000000000000 w *UND* 0000000000000000 __gmon_start__ 0000000000601018 g O .data 0000000000000000 .hidden __dso_handle 0000000000400648 g O .rodata 0000000000000004 _IO_stdin_used 0000000000400560 g F .text 0000000000000089 __libc_csu_init 0000000000601030 g *ABS* 0000000000000000 _end 0000000000400440 g F .text 0000000000000000 _start 0000000000601020 g *ABS* 0000000000000000 __bss_start 0000000000400524 g F .text 0000000000000036 main 0000000000000000 w *UND* 0000000000000000 _Jv_RegisterClasses 00000000004003f0 g F .init 0000000000000000 _init |
$ gcc -pg tttt.c $ objdump -x a.out a.out: file format elf64-x86-64 a.out architecture: i386:x86-64, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x0000000000400570 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3 filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x INTERP off 0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0 filesz 0x000000000000001c memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21 filesz 0x00000000000008c4 memsz 0x00000000000008c4 flags r-x LOAD off 0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**21 filesz 0x0000000000000220 memsz 0x0000000000000238 flags rw- DYNAMIC off 0x0000000000000e48 vaddr 0x0000000000600e48 paddr 0x0000000000600e48 align 2**3 filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw- NOTE off 0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2 filesz 0x0000000000000044 memsz 0x0000000000000044 flags r-- EH_FRAME off 0x00000000000007dc vaddr 0x00000000004007dc paddr 0x00000000004007dc align 2**2 filesz 0x0000000000000034 memsz 0x0000000000000034 flags r-- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- RELRO off 0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**0 filesz 0x00000000000001e0 memsz 0x00000000000001e0 flags r-- Dynamic Section: NEEDED libc.so.6 INIT 0x00000000004004e8 FINI 0x00000000004007c8 GNU_HASH 0x0000000000400298 STRTAB 0x0000000000400380 SYMTAB 0x00000000004002c0 STRSZ 0x000000000000007e SYMENT 0x0000000000000018 DEBUG 0x0000000000000000 PLTGOT 0x0000000000600fe8 PLTRELSZ 0x0000000000000090 PLTREL 0x0000000000000007 JMPREL 0x0000000000400458 RELA 0x0000000000400440 RELASZ 0x0000000000000018 RELAENT 0x0000000000000018 VERNEED 0x0000000000400410 VERNEEDNUM 0x0000000000000001 VERSYM 0x00000000004003fe Version References: required from libc.so.6: 0x09691a75 0x00 03 GLIBC_2.2.5 0x0d696914 0x00 02 GLIBC_2.4 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 0000001c 0000000000400238 0000000000400238 00000238 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .note.ABI-tag 00000020 0000000000400254 0000000000400254 00000254 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .note.gnu.build-id 00000024 0000000000400274 0000000000400274 00000274 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .gnu.hash 00000028 0000000000400298 0000000000400298 00000298 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .dynsym 000000c0 00000000004002c0 00000000004002c0 000002c0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .dynstr 0000007e 0000000000400380 0000000000400380 00000380 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .gnu.version 00000010 00000000004003fe 00000000004003fe 000003fe 2**1 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .gnu.version_r 00000030 0000000000400410 0000000000400410 00000410 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .rela.dyn 00000018 0000000000400440 0000000000400440 00000440 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .rela.plt 00000090 0000000000400458 0000000000400458 00000458 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 10 .init 00000018 00000000004004e8 00000000004004e8 000004e8 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 11 .plt 00000070 0000000000400500 0000000000400500 00000500 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 12 .text 00000258 0000000000400570 0000000000400570 00000570 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 13 .fini 0000000e 00000000004007c8 00000000004007c8 000007c8 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 14 .rodata 00000004 00000000004007d8 00000000004007d8 000007d8 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 15 .eh_frame_hdr 00000034 00000000004007dc 00000000004007dc 000007dc 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 16 .eh_frame 000000b4 0000000000400810 0000000000400810 00000810 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 17 .ctors 00000010 0000000000600e20 0000000000600e20 00000e20 2**3 CONTENTS, ALLOC, LOAD, DATA 18 .dtors 00000010 0000000000600e30 0000000000600e30 00000e30 2**3 CONTENTS, ALLOC, LOAD, DATA 19 .jcr 00000008 0000000000600e40 0000000000600e40 00000e40 2**3 CONTENTS, ALLOC, LOAD, DATA 20 .dynamic 00000190 0000000000600e48 0000000000600e48 00000e48 2**3 CONTENTS, ALLOC, LOAD, DATA 21 .got 00000010 0000000000600fd8 0000000000600fd8 00000fd8 2**3 CONTENTS, ALLOC, LOAD, DATA 22 .got.plt 00000048 0000000000600fe8 0000000000600fe8 00000fe8 2**3 CONTENTS, ALLOC, LOAD, DATA 23 .data 00000010 0000000000601030 0000000000601030 00001030 2**3 CONTENTS, ALLOC, LOAD, DATA 24 .bss 00000018 0000000000601040 0000000000601040 00001040 2**4 ALLOC 25 .comment 0000002a 0000000000000000 0000000000000000 00001040 2**0 CONTENTS, READONLY SYMBOL TABLE: 0000000000400238 l d .interp 0000000000000000 .interp 0000000000400254 l d .note.ABI-tag 0000000000000000 .note.ABI-tag 0000000000400274 l d .note.gnu.build-id 0000000000000000 .note.gnu.build-id 0000000000400298 l d .gnu.hash 0000000000000000 .gnu.hash 00000000004002c0 l d .dynsym 0000000000000000 .dynsym 0000000000400380 l d .dynstr 0000000000000000 .dynstr 00000000004003fe l d .gnu.version 0000000000000000 .gnu.version 0000000000400410 l d .gnu.version_r 0000000000000000 .gnu.version_r 0000000000400440 l d .rela.dyn 0000000000000000 .rela.dyn 0000000000400458 l d .rela.plt 0000000000000000 .rela.plt 00000000004004e8 l d .init 0000000000000000 .init 0000000000400500 l d .plt 0000000000000000 .plt 0000000000400570 l d .text 0000000000000000 .text 00000000004007c8 l d .fini 0000000000000000 .fini 00000000004007d8 l d .rodata 0000000000000000 .rodata 00000000004007dc l d .eh_frame_hdr 0000000000000000 .eh_frame_hdr 0000000000400810 l d .eh_frame 0000000000000000 .eh_frame 0000000000600e20 l d .ctors 0000000000000000 .ctors 0000000000600e30 l d .dtors 0000000000000000 .dtors 0000000000600e40 l d .jcr 0000000000000000 .jcr 0000000000600e48 l d .dynamic 0000000000000000 .dynamic 0000000000600fd8 l d .got 0000000000000000 .got 0000000000600fe8 l d .got.plt 0000000000000000 .got.plt 0000000000601030 l d .data 0000000000000000 .data 0000000000601040 l d .bss 0000000000000000 .bss 0000000000000000 l d .comment 0000000000000000 .comment 0000000000601040 l O .bss 0000000000000004 called.4053 00000000004005e0 l F .text 0000000000000000 call_gmon_start 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e20 l O .ctors 0000000000000000 __CTOR_LIST__ 0000000000600e30 l O .dtors 0000000000000000 __DTOR_LIST__ 0000000000600e40 l O .jcr 0000000000000000 __JCR_LIST__ 0000000000400600 l F .text 0000000000000000 __do_global_dtors_aux 0000000000601048 l O .bss 0000000000000001 completed.6531 0000000000601050 l O .bss 0000000000000008 dtor_idx.6533 0000000000400670 l F .text 0000000000000000 frame_dummy 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e28 l O .ctors 0000000000000000 __CTOR_END__ 00000000004008c0 l O .eh_frame 0000000000000000 __FRAME_END__ 0000000000600e40 l O .jcr 0000000000000000 __JCR_END__ 0000000000400790 l F .text 0000000000000000 __do_global_ctors_aux 0000000000000000 l df *ABS* 0000000000000000 tttt.c 0000000000600e1c l .ctors 0000000000000000 __init_array_end 0000000000601038 l O .data 0000000000000000 __dso_handle 0000000000600e48 l O .dynamic 0000000000000000 _DYNAMIC 0000000000600e1c l .ctors 0000000000000000 __init_array_start 0000000000600fe8 l O .got.plt 0000000000000000 _GLOBAL_OFFSET_TABLE_ 0000000000400760 g F .text 0000000000000002 __libc_csu_fini 0000000000601030 w .data 0000000000000000 data_start 0000000000400770 g F .text 000000000000001a .hidden atexit 0000000000601040 g *ABS* 0000000000000000 _edata 00000000004007c8 g F .fini 0000000000000000 _fini 0000000000000000 F *UND* 0000000000000000 __stack_chk_fail@@GLIBC_2.4 0000000000400520 F *UND* 0000000000000000 _mcleanup@@GLIBC_2.2.5 0000000000600e38 g O .dtors 0000000000000000 .hidden __DTOR_END__ 0000000000000000 F *UND* 0000000000000000 __libc_start_main@@GLIBC_2.2.5 0000000000601030 g .data 0000000000000000 __data_start 0000000000000000 F *UND* 0000000000000000 __monstartup@@GLIBC_2.2.5 00000000004005a0 g F .text 000000000000003f __gmon_start__ 00000000004007d8 g O .rodata 0000000000000004 _IO_stdin_used 00000000004006d0 g F .text 0000000000000089 __libc_csu_init 0000000000601058 g *ABS* 0000000000000000 _end 0000000000400570 g F .text 0000000000000000 _start 0000000000601040 g *ABS* 0000000000000000 __bss_start 0000000000400694 g F .text 000000000000003b main 0000000000000000 F *UND* 0000000000000000 mcount@@GLIBC_2.2.5 00000000004007d6 g *ABS* 0000000000000000 etext 0000000000000000 w *UND* 0000000000000000 _Jv_RegisterClasses 0000000000000000 F *UND* 0000000000000000 __cxa_atexit@@GLIBC_2.2.5 00000000004004e8 g F .init 0000000000000000 _init |
디버깅, 프로파일링 추가
$ gcc -g -pg tttt.c $ objdump -x a.out a.out: file format elf64-x86-64 a.out architecture: i386:x86-64, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x0000000000400570 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3 filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x INTERP off 0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0 filesz 0x000000000000001c memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21 filesz 0x00000000000008c4 memsz 0x00000000000008c4 flags r-x LOAD off 0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**21 filesz 0x0000000000000220 memsz 0x0000000000000238 flags rw- DYNAMIC off 0x0000000000000e48 vaddr 0x0000000000600e48 paddr 0x0000000000600e48 align 2**3 filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw- NOTE off 0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2 filesz 0x0000000000000044 memsz 0x0000000000000044 flags r-- EH_FRAME off 0x00000000000007dc vaddr 0x00000000004007dc paddr 0x00000000004007dc align 2**2 filesz 0x0000000000000034 memsz 0x0000000000000034 flags r-- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- RELRO off 0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**0 filesz 0x00000000000001e0 memsz 0x00000000000001e0 flags r-- Dynamic Section: NEEDED libc.so.6 INIT 0x00000000004004e8 FINI 0x00000000004007c8 GNU_HASH 0x0000000000400298 STRTAB 0x0000000000400380 SYMTAB 0x00000000004002c0 STRSZ 0x000000000000007e SYMENT 0x0000000000000018 DEBUG 0x0000000000000000 PLTGOT 0x0000000000600fe8 PLTRELSZ 0x0000000000000090 PLTREL 0x0000000000000007 JMPREL 0x0000000000400458 RELA 0x0000000000400440 RELASZ 0x0000000000000018 RELAENT 0x0000000000000018 VERNEED 0x0000000000400410 VERNEEDNUM 0x0000000000000001 VERSYM 0x00000000004003fe Version References: required from libc.so.6: 0x09691a75 0x00 03 GLIBC_2.2.5 0x0d696914 0x00 02 GLIBC_2.4 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 0000001c 0000000000400238 0000000000400238 00000238 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .note.ABI-tag 00000020 0000000000400254 0000000000400254 00000254 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .note.gnu.build-id 00000024 0000000000400274 0000000000400274 00000274 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .gnu.hash 00000028 0000000000400298 0000000000400298 00000298 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .dynsym 000000c0 00000000004002c0 00000000004002c0 000002c0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .dynstr 0000007e 0000000000400380 0000000000400380 00000380 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .gnu.version 00000010 00000000004003fe 00000000004003fe 000003fe 2**1 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .gnu.version_r 00000030 0000000000400410 0000000000400410 00000410 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .rela.dyn 00000018 0000000000400440 0000000000400440 00000440 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .rela.plt 00000090 0000000000400458 0000000000400458 00000458 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 10 .init 00000018 00000000004004e8 00000000004004e8 000004e8 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 11 .plt 00000070 0000000000400500 0000000000400500 00000500 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 12 .text 00000258 0000000000400570 0000000000400570 00000570 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 13 .fini 0000000e 00000000004007c8 00000000004007c8 000007c8 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 14 .rodata 00000004 00000000004007d8 00000000004007d8 000007d8 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 15 .eh_frame_hdr 00000034 00000000004007dc 00000000004007dc 000007dc 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 16 .eh_frame 000000b4 0000000000400810 0000000000400810 00000810 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 17 .ctors 00000010 0000000000600e20 0000000000600e20 00000e20 2**3 CONTENTS, ALLOC, LOAD, DATA 18 .dtors 00000010 0000000000600e30 0000000000600e30 00000e30 2**3 CONTENTS, ALLOC, LOAD, DATA 19 .jcr 00000008 0000000000600e40 0000000000600e40 00000e40 2**3 CONTENTS, ALLOC, LOAD, DATA 20 .dynamic 00000190 0000000000600e48 0000000000600e48 00000e48 2**3 CONTENTS, ALLOC, LOAD, DATA 21 .got 00000010 0000000000600fd8 0000000000600fd8 00000fd8 2**3 CONTENTS, ALLOC, LOAD, DATA 22 .got.plt 00000048 0000000000600fe8 0000000000600fe8 00000fe8 2**3 CONTENTS, ALLOC, LOAD, DATA 23 .data 00000010 0000000000601030 0000000000601030 00001030 2**3 CONTENTS, ALLOC, LOAD, DATA 24 .bss 00000018 0000000000601040 0000000000601040 00001040 2**4 ALLOC 25 .comment 0000002a 0000000000000000 0000000000000000 00001040 2**0 CONTENTS, READONLY 26 .debug_aranges 00000030 0000000000000000 0000000000000000 0000106a 2**0 CONTENTS, READONLY, DEBUGGING 27 .debug_info 0000009d 0000000000000000 0000000000000000 0000109a 2**0 CONTENTS, READONLY, DEBUGGING 28 .debug_abbrev 0000006f 0000000000000000 0000000000000000 00001137 2**0 CONTENTS, READONLY, DEBUGGING 29 .debug_line 0000003c 0000000000000000 0000000000000000 000011a6 2**0 CONTENTS, READONLY, DEBUGGING 30 .debug_str 0000004c 0000000000000000 0000000000000000 000011e2 2**0 CONTENTS, READONLY, DEBUGGING 31 .debug_loc 00000060 0000000000000000 0000000000000000 0000122e 2**0 CONTENTS, READONLY, DEBUGGING SYMBOL TABLE: 0000000000400238 l d .interp 0000000000000000 .interp 0000000000400254 l d .note.ABI-tag 0000000000000000 .note.ABI-tag 0000000000400274 l d .note.gnu.build-id 0000000000000000 .note.gnu.build-id 0000000000400298 l d .gnu.hash 0000000000000000 .gnu.hash 00000000004002c0 l d .dynsym 0000000000000000 .dynsym 0000000000400380 l d .dynstr 0000000000000000 .dynstr 00000000004003fe l d .gnu.version 0000000000000000 .gnu.version 0000000000400410 l d .gnu.version_r 0000000000000000 .gnu.version_r 0000000000400440 l d .rela.dyn 0000000000000000 .rela.dyn 0000000000400458 l d .rela.plt 0000000000000000 .rela.plt 00000000004004e8 l d .init 0000000000000000 .init 0000000000400500 l d .plt 0000000000000000 .plt 0000000000400570 l d .text 0000000000000000 .text 00000000004007c8 l d .fini 0000000000000000 .fini 00000000004007d8 l d .rodata 0000000000000000 .rodata 00000000004007dc l d .eh_frame_hdr 0000000000000000 .eh_frame_hdr 0000000000400810 l d .eh_frame 0000000000000000 .eh_frame 0000000000600e20 l d .ctors 0000000000000000 .ctors 0000000000600e30 l d .dtors 0000000000000000 .dtors 0000000000600e40 l d .jcr 0000000000000000 .jcr 0000000000600e48 l d .dynamic 0000000000000000 .dynamic 0000000000600fd8 l d .got 0000000000000000 .got 0000000000600fe8 l d .got.plt 0000000000000000 .got.plt 0000000000601030 l d .data 0000000000000000 .data 0000000000601040 l d .bss 0000000000000000 .bss 0000000000000000 l d .comment 0000000000000000 .comment 0000000000000000 l d .debug_aranges 0000000000000000 .debug_aranges 0000000000000000 l d .debug_info 0000000000000000 .debug_info 0000000000000000 l d .debug_abbrev 0000000000000000 .debug_abbrev 0000000000000000 l d .debug_line 0000000000000000 .debug_line 0000000000000000 l d .debug_str 0000000000000000 .debug_str 0000000000000000 l d .debug_loc 0000000000000000 .debug_loc 0000000000601040 l O .bss 0000000000000004 called.4053 00000000004005e0 l F .text 0000000000000000 call_gmon_start 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e20 l O .ctors 0000000000000000 __CTOR_LIST__ 0000000000600e30 l O .dtors 0000000000000000 __DTOR_LIST__ 0000000000600e40 l O .jcr 0000000000000000 __JCR_LIST__ 0000000000400600 l F .text 0000000000000000 __do_global_dtors_aux 0000000000601048 l O .bss 0000000000000001 completed.6531 0000000000601050 l O .bss 0000000000000008 dtor_idx.6533 0000000000400670 l F .text 0000000000000000 frame_dummy 0000000000000000 l df *ABS* 0000000000000000 crtstuff.c 0000000000600e28 l O .ctors 0000000000000000 __CTOR_END__ 00000000004008c0 l O .eh_frame 0000000000000000 __FRAME_END__ 0000000000600e40 l O .jcr 0000000000000000 __JCR_END__ 0000000000400790 l F .text 0000000000000000 __do_global_ctors_aux 0000000000000000 l df *ABS* 0000000000000000 tttt.c 0000000000600e1c l .ctors 0000000000000000 __init_array_end 0000000000601038 l O .data 0000000000000000 __dso_handle 0000000000600e48 l O .dynamic 0000000000000000 _DYNAMIC 0000000000600e1c l .ctors 0000000000000000 __init_array_start 0000000000600fe8 l O .got.plt 0000000000000000 _GLOBAL_OFFSET_TABLE_ 0000000000400760 g F .text 0000000000000002 __libc_csu_fini 0000000000601030 w .data 0000000000000000 data_start 0000000000400770 g F .text 000000000000001a .hidden atexit 0000000000601040 g *ABS* 0000000000000000 _edata 00000000004007c8 g F .fini 0000000000000000 _fini 0000000000000000 F *UND* 0000000000000000 __stack_chk_fail@@GLIBC_2.4 0000000000400520 F *UND* 0000000000000000 _mcleanup@@GLIBC_2.2.5 0000000000600e38 g O .dtors 0000000000000000 .hidden __DTOR_END__ 0000000000000000 F *UND* 0000000000000000 __libc_start_main@@GLIBC_2.2.5 0000000000601030 g .data 0000000000000000 __data_start 0000000000000000 F *UND* 0000000000000000 __monstartup@@GLIBC_2.2.5 00000000004005a0 g F .text 000000000000003f __gmon_start__ 00000000004007d8 g O .rodata 0000000000000004 _IO_stdin_used 00000000004006d0 g F .text 0000000000000089 __libc_csu_init 0000000000601058 g *ABS* 0000000000000000 _end 0000000000400570 g F .text 0000000000000000 _start 0000000000601040 g *ABS* 0000000000000000 __bss_start 0000000000400694 g F .text 000000000000003b main 0000000000000000 F *UND* 0000000000000000 mcount@@GLIBC_2.2.5 00000000004007d6 g *ABS* 0000000000000000 etext 0000000000000000 w *UND* 0000000000000000 _Jv_RegisterClasses 0000000000000000 F *UND* 0000000000000000 __cxa_atexit@@GLIBC_2.2.5 00000000004004e8 g F .init 0000000000000000 _init |
$ gcc -g -pg tttt.c $ strip a.out $ objdump -x a.out a.out: file format elf64-x86-64 a.out architecture: i386:x86-64, flags 0x00000112: EXEC_P, HAS_SYMS, D_PAGED start address 0x0000000000400570 Program Header: PHDR off 0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2**3 filesz 0x00000000000001f8 memsz 0x00000000000001f8 flags r-x INTERP off 0x0000000000000238 vaddr 0x0000000000400238 paddr 0x0000000000400238 align 2**0 filesz 0x000000000000001c memsz 0x000000000000001c flags r-- LOAD off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2**21 filesz 0x00000000000008c4 memsz 0x00000000000008c4 flags r-x LOAD off 0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**21 filesz 0x0000000000000220 memsz 0x0000000000000238 flags rw- DYNAMIC off 0x0000000000000e48 vaddr 0x0000000000600e48 paddr 0x0000000000600e48 align 2**3 filesz 0x0000000000000190 memsz 0x0000000000000190 flags rw- NOTE off 0x0000000000000254 vaddr 0x0000000000400254 paddr 0x0000000000400254 align 2**2 filesz 0x0000000000000044 memsz 0x0000000000000044 flags r-- EH_FRAME off 0x00000000000007dc vaddr 0x00000000004007dc paddr 0x00000000004007dc align 2**2 filesz 0x0000000000000034 memsz 0x0000000000000034 flags r-- STACK off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3 filesz 0x0000000000000000 memsz 0x0000000000000000 flags rw- RELRO off 0x0000000000000e20 vaddr 0x0000000000600e20 paddr 0x0000000000600e20 align 2**0 filesz 0x00000000000001e0 memsz 0x00000000000001e0 flags r-- Dynamic Section: NEEDED libc.so.6 INIT 0x00000000004004e8 FINI 0x00000000004007c8 GNU_HASH 0x0000000000400298 STRTAB 0x0000000000400380 SYMTAB 0x00000000004002c0 STRSZ 0x000000000000007e SYMENT 0x0000000000000018 DEBUG 0x0000000000000000 PLTGOT 0x0000000000600fe8 PLTRELSZ 0x0000000000000090 PLTREL 0x0000000000000007 JMPREL 0x0000000000400458 RELA 0x0000000000400440 RELASZ 0x0000000000000018 RELAENT 0x0000000000000018 VERNEED 0x0000000000400410 VERNEEDNUM 0x0000000000000001 VERSYM 0x00000000004003fe Version References: required from libc.so.6: 0x09691a75 0x00 03 GLIBC_2.2.5 0x0d696914 0x00 02 GLIBC_2.4 Sections: Idx Name Size VMA LMA File off Algn 0 .interp 0000001c 0000000000400238 0000000000400238 00000238 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .note.ABI-tag 00000020 0000000000400254 0000000000400254 00000254 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .note.gnu.build-id 00000024 0000000000400274 0000000000400274 00000274 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 3 .gnu.hash 00000028 0000000000400298 0000000000400298 00000298 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .dynsym 000000c0 00000000004002c0 00000000004002c0 000002c0 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .dynstr 0000007e 0000000000400380 0000000000400380 00000380 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .gnu.version 00000010 00000000004003fe 00000000004003fe 000003fe 2**1 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .gnu.version_r 00000030 0000000000400410 0000000000400410 00000410 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .rela.dyn 00000018 0000000000400440 0000000000400440 00000440 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .rela.plt 00000090 0000000000400458 0000000000400458 00000458 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 10 .init 00000018 00000000004004e8 00000000004004e8 000004e8 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 11 .plt 00000070 0000000000400500 0000000000400500 00000500 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 12 .text 00000258 0000000000400570 0000000000400570 00000570 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 13 .fini 0000000e 00000000004007c8 00000000004007c8 000007c8 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 14 .rodata 00000004 00000000004007d8 00000000004007d8 000007d8 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 15 .eh_frame_hdr 00000034 00000000004007dc 00000000004007dc 000007dc 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 16 .eh_frame 000000b4 0000000000400810 0000000000400810 00000810 2**3 CONTENTS, ALLOC, LOAD, READONLY, DATA 17 .ctors 00000010 0000000000600e20 0000000000600e20 00000e20 2**3 CONTENTS, ALLOC, LOAD, DATA 18 .dtors 00000010 0000000000600e30 0000000000600e30 00000e30 2**3 CONTENTS, ALLOC, LOAD, DATA 19 .jcr 00000008 0000000000600e40 0000000000600e40 00000e40 2**3 CONTENTS, ALLOC, LOAD, DATA 20 .dynamic 00000190 0000000000600e48 0000000000600e48 00000e48 2**3 CONTENTS, ALLOC, LOAD, DATA 21 .got 00000010 0000000000600fd8 0000000000600fd8 00000fd8 2**3 CONTENTS, ALLOC, LOAD, DATA 22 .got.plt 00000048 0000000000600fe8 0000000000600fe8 00000fe8 2**3 CONTENTS, ALLOC, LOAD, DATA 23 .data 00000010 0000000000601030 0000000000601030 00001030 2**3 CONTENTS, ALLOC, LOAD, DATA 24 .bss 00000018 0000000000601040 0000000000601040 00001040 2**4 ALLOC 25 .comment 0000002a 0000000000000000 0000000000000000 00001040 2**0 CONTENTS, READONLY SYMBOL TABLE: no symbols |
프로파일링 관련 gmon_start와 -pg 옵션 없을때 주소값의 차이
You can see here, that the symbol value of __gmon_start__ is set to 00000000.
[링크 : http://stackoverflow.com/questions/12697081/what-is-gmon-start-symbol]
'Linux' 카테고리의 다른 글
AMD avx 리눅스 식별자 (0) | 2016.03.08 |
---|---|
리눅스용 비디오 편집 프로그램 (0) | 2016.03.02 |
iotop (0) | 2016.01.19 |
리눅스에서 메모리 뱅크 확인하기 (0) | 2015.10.30 |
IIO - Industrial I/O (2) | 2015.09.03 |