% readelf -a oreapp
ELF Header:
Magic: 7f 45 4c 46 02 01 01 09 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: FreeBSD
ABI Version: 0
Type: EXEC (Executable file)
Machine: Advanced Micro Devices x86-64
Version: 0x1
Entry point address: 0x4006e0
Start of program headers: 64 (bytes into file)
Start of section headers: 4728 (bytes into file)
Flags: 0
Size of this header: 64 (bytes)
Size of program headers: 56 (bytes)
Number of program headers: 8
Size of section headers: 64 (bytes)
Number of section headers: 29
Section header string table index: 26
Elf file type is EXEC (Executable file)
Entry point 0x4006e0
There are 8 program headers, starting at offset 64
Program Headers:
Type Offset VirtAddr PhysAddr
FileSiz MemSiz Flg Align
PHDR 0x0000000000000040 0x0000000000400040 0x0000000000400040
0x00000000000001c0 0x00000000000001c0 R E 0x8
INTERP 0x0000000000000200 0x0000000000400200 0x0000000000400200
0x0000000000000015 0x0000000000000015 R 0x1
[Requesting program interpreter: /libexec/ld-elf.so.1]
LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000
0x0000000000000d6c 0x0000000000000d6c R E 0x200000
LOAD 0x0000000000000d70 0x0000000000600d70 0x0000000000600d70
0x0000000000000241 0x0000000000001278 RW 0x200000
DYNAMIC 0x0000000000000d98 0x0000000000600d98 0x0000000000600d98
0x00000000000001a0 0x00000000000001a0 RW 0x8
NOTE 0x0000000000000218 0x0000000000400218 0x0000000000400218
0x0000000000000030 0x0000000000000030 R 0x4
GNU_EH_FRAME 0x0000000000000c24 0x0000000000400c24 0x0000000000400c24
0x0000000000000044 0x0000000000000044 R 0x4
GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000
0x0000000000000000 0x0000000000000000 RW 0x8
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .interp .note.tag .hash .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.dyn .rela.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame
03 .ctors .dtors .jcr .dynamic .got.plt .data .bss
04 .dynamic
05 .note.tag
06 .eh_frame_hdr
07
There are 29 section headers, starting at offset 0x1278:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] (null) NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .interp PROGBITS 0000000000400200 00000200
0000000000000015 0000000000000000 A 0 0 1
[ 2] .note.tag NOTE 0000000000400218 00000218
0000000000000030 0000000000000000 A 0 0 4
[ 3] .hash HASH 0000000000400248 00000248
0000000000000054 0000000000000004 A 5 0 8
[ 4] .gnu.hash GNU_HASH 00000000004002a0 000002a0
0000000000000038 0000000000000000 A 5 0 8
[ 5] .dynsym DYNSYM 00000000004002d8 000002d8
0000000000000180 0000000000000018 A 6 1 8
[ 6] .dynstr STRTAB 0000000000400458 00000458
0000000000000087 0000000000000000 A 0 0 1
[ 7] .gnu.version SUNW_versym 00000000004004e0 000004e0
0000000000000020 0000000000000002 A 5 0 2
[ 8] .gnu.version_r SUNW_verneed 0000000000400500 00000500
0000000000000020 0000000000000000 A 6 1 8
[ 9] .rela.dyn RELA 0000000000400520 00000520
0000000000000030 0000000000000018 A 5 0 8
[10] .rela.plt RELA 0000000000400550 00000550
00000000000000d8 0000000000000018 A 5 12 8
[11] .init PROGBITS 0000000000400628 00000628
0000000000000013 0000000000000000 AX 0 0 4
[12] .plt PROGBITS 000000000040063c 0000063c
00000000000000a0 0000000000000010 AX 0 0 4
[13] .text PROGBITS 00000000004006e0 000006e0
00000000000004c8 0000000000000000 AX 0 0 16
[14] .fini PROGBITS 0000000000400ba8 00000ba8
000000000000000e 0000000000000000 AX 0 0 4
[15] .rodata PROGBITS 0000000000400bb6 00000bb6
000000000000006d 0000000000000001 AMS 0 0 1
[16] .eh_frame_hdr PROGBITS 0000000000400c24 00000c24
0000000000000044 0000000000000000 A 0 0 4
[17] .eh_frame X86_64_UNWIND 0000000000400c68 00000c68
0000000000000104 0000000000000000 A 0 0 8
[18] .ctors PROGBITS 0000000000600d70 00000d70
0000000000000010 0000000000000000 WA 0 0 8
[19] .dtors PROGBITS 0000000000600d80 00000d80
0000000000000010 0000000000000000 WA 0 0 8
[20] .jcr PROGBITS 0000000000600d90 00000d90
0000000000000008 0000000000000000 WA 0 0 8
[21] .dynamic DYNAMIC 0000000000600d98 00000d98
00000000000001a0 0000000000000010 WA 6 0 8
[22] .got.plt PROGBITS 0000000000600f38 00000f38
0000000000000060 0000000000000008 WA 0 0 8
[23] .data PROGBITS 0000000000600f98 00000f98
0000000000000019 0000000000000000 WA 0 0 8
[24] .bss NOBITS 0000000000600fc0 00000fb1
0000000000001028 0000000000000000 WA 0 0 16
[25] .comment PROGBITS 0000000000000000 00000fb1
00000000000001e3 0000000000000001 MS 0 0 1
[26] .shstrtab STRTAB 0000000000000000 00001194
00000000000000e2 0000000000000000 0 0 1
[27] .symtab SYMTAB 0000000000000000 000019b8
0000000000000810 0000000000000018 28 58 8
[28] .strtab STRTAB 0000000000000000 000021c8
0000000000000363 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
Dynamic section at offset 0xd98 contains 21 entries:
Tag Type Name/Value
0x0000000000000001 NEEDED Shared library: [libc.so.7]
0x000000000000000c INIT 0x400628
0x000000000000000d FINI 0x400ba8
0x0000000000000004 HASH 0x400248
0x000000006ffffef5 GNU_HASH 0x4002a0
0x0000000000000005 STRTAB 0x400458
0x0000000000000006 SYMTAB 0x4002d8
0x000000000000000a STRSZ 135 (bytes)
0x000000000000000b SYMENT 24 (bytes)
0x0000000000000015 DEBUG 0x0
0x0000000000000003 PLTGOT 0x600f38
0x0000000000000002 PLTRELSZ 216 (bytes)
0x0000000000000014 PLTREL RELA
0x0000000000000017 JMPREL 0x400550
0x0000000000000007 RELA 0x400520
0x0000000000000008 RELASZ 48 (bytes)
0x0000000000000009 RELAENT 24 (bytes)
0x000000006ffffffe VERNEED 0x400500
0x000000006fffffff VERNEEDNUM 1
0x000000006ffffff0 VERSYM 0x4004e0
0x0000000000000000 NULL 0x0
Relocation section with addend (.rela.dyn):
r_offset r_info r_type st_value st_name + r_addend
000000600fc0 000e00000005 R_X86_64_COPY 0000000000600fc0 optind + 0
000000600fc8 000f00000005 R_X86_64_COPY 0000000000600fc8 __stderrp + 0
Relocation section with addend (.rela.plt):
r_offset r_info r_type st_value st_name + r_addend
000000600f50 000200000007 R_X86_64_JUMP_SLOT 0000000000000000 printf + 0
000000600f58 000300000007 R_X86_64_JUMP_SLOT 0000000000000000 atexit + 0
000000600f60 000400000007 R_X86_64_JUMP_SLOT 0000000000000000 _init_tls + 0
000000600f68 000500000007 R_X86_64_JUMP_SLOT 0000000000000000 fprintf + 0
000000600f70 000600000007 R_X86_64_JUMP_SLOT 0000000000000000 getopt + 0
000000600f78 000700000007 R_X86_64_JUMP_SLOT 0000000000000000 calloc + 0
000000600f80 000800000007 R_X86_64_JUMP_SLOT 0000000000000000 strncpy + 0
000000600f88 000900000007 R_X86_64_JUMP_SLOT 0000000000000000 exit + 0
000000600f90 000a00000007 R_X86_64_JUMP_SLOT 0000000000000000 strcmp + 0
Symbol table (.dynsym) contains 16 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
2: 0000000000000000 188 FUNC GLOBAL DEFAULT UND printf@FBSD_1.0 (2)
3: 0000000000000000 71 FUNC GLOBAL DEFAULT UND atexit@FBSD_1.0 (2)
4: 0000000000000000 6 FUNC GLOBAL DEFAULT UND _init_tls@FBSD_1.0 (2)
5: 0000000000000000 239 FUNC GLOBAL DEFAULT UND fprintf@FBSD_1.0 (2)
6: 0000000000000000 617 FUNC GLOBAL DEFAULT UND getopt@FBSD_1.0 (2)
7: 0000000000000000 3171 FUNC GLOBAL DEFAULT UND calloc@FBSD_1.0 (2)
8: 0000000000000000 76 FUNC GLOBAL DEFAULT UND strncpy@FBSD_1.0 (2)
9: 0000000000000000 54 FUNC GLOBAL DEFAULT UND exit@FBSD_1.0 (2)
10: 0000000000000000 126 FUNC GLOBAL DEFAULT UND strcmp@FBSD_1.0 (2)
11: 0000000000601fd0 8 OBJECT GLOBAL DEFAULT 24 environ
12: 0000000000601fe8 0 NOTYPE GLOBAL DEFAULT ABS _end
13: 0000000000600f98 8 OBJECT GLOBAL DEFAULT 23 __progname
14: 0000000000600fc0 4 OBJECT GLOBAL DEFAULT 24 optind@FBSD_1.0 (2)
15: 0000000000600fc8 8 OBJECT GLOBAL DEFAULT 24 __stderrp@FBSD_1.0 (2)
Symbol table (.symtab) contains 86 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000400200 0 SECTION LOCAL DEFAULT 1
2: 0000000000400218 0 SECTION LOCAL DEFAULT 2
3: 0000000000400248 0 SECTION LOCAL DEFAULT 3
4: 00000000004002a0 0 SECTION LOCAL DEFAULT 4
5: 00000000004002d8 0 SECTION LOCAL DEFAULT 5
6: 0000000000400458 0 SECTION LOCAL DEFAULT 6
7: 00000000004004e0 0 SECTION LOCAL DEFAULT 7
8: 0000000000400500 0 SECTION LOCAL DEFAULT 8
9: 0000000000400520 0 SECTION LOCAL DEFAULT 9
10: 0000000000400550 0 SECTION LOCAL DEFAULT 10
11: 0000000000400628 0 SECTION LOCAL DEFAULT 11
12: 000000000040063c 0 SECTION LOCAL DEFAULT 12
13: 00000000004006e0 0 SECTION LOCAL DEFAULT 13
14: 0000000000400ba8 0 SECTION LOCAL DEFAULT 14
15: 0000000000400bb6 0 SECTION LOCAL DEFAULT 15
16: 0000000000400c24 0 SECTION LOCAL DEFAULT 16
17: 0000000000400c68 0 SECTION LOCAL DEFAULT 17
18: 0000000000600d70 0 SECTION LOCAL DEFAULT 18
19: 0000000000600d80 0 SECTION LOCAL DEFAULT 19
20: 0000000000600d90 0 SECTION LOCAL DEFAULT 20
21: 0000000000600d98 0 SECTION LOCAL DEFAULT 21
22: 0000000000600f38 0 SECTION LOCAL DEFAULT 22
23: 0000000000600f98 0 SECTION LOCAL DEFAULT 23
24: 0000000000600fc0 0 SECTION LOCAL DEFAULT 24
25: 0000000000000000 0 SECTION LOCAL DEFAULT 25
26: 0000000000000000 0 FILE LOCAL DEFAULT ABS /usr/src/lib/csu/amd64/crt1.c
27: 0000000000400218 24 OBJECT LOCAL DEFAULT 2 abitag
28: 0000000000400230 24 OBJECT LOCAL DEFAULT 2 crt_noinit_tag
29: 0000000000400870 83 FUNC LOCAL DEFAULT 13 finalizer
30: 0000000000000000 0 FILE LOCAL DEFAULT ABS /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c
31: 0000000000600d70 8 OBJECT LOCAL DEFAULT 18 __CTOR_LIST__
32: 0000000000600d80 8 OBJECT LOCAL DEFAULT 19 __DTOR_LIST__
33: 0000000000600d90 0 OBJECT LOCAL DEFAULT 20 __JCR_LIST__
34: 00000000004008d0 53 FUNC LOCAL DEFAULT 13 __do_global_dtors_aux
35: 0000000000600fb0 1 OBJECT LOCAL DEFAULT 23 __do_global_dtors_aux.completed
36: 0000000000600fa8 8 OBJECT LOCAL DEFAULT 23 __do_global_dtors_aux.p
37: 0000000000400910 34 FUNC LOCAL DEFAULT 13 frame_dummy
38: 0000000000000000 0 FILE LOCAL DEFAULT ABS /usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c
39: 0000000000600d78 8 OBJECT LOCAL DEFAULT 18 __CTOR_END__
40: 0000000000600d88 8 OBJECT LOCAL DEFAULT 19 __DTOR_END__
41: 0000000000400d68 4 OBJECT LOCAL DEFAULT 17 __FRAME_END__
42: 0000000000600d90 8 OBJECT LOCAL DEFAULT 20 __JCR_END__
43: 0000000000400b70 54 FUNC LOCAL DEFAULT 13 __do_global_ctors_aux
44: 0000000000000000 0 FILE LOCAL DEFAULT ABS oreapp.c
45: 0000000000000000 0 FILE LOCAL DEFAULT ABS setmsg.c
46: 0000000000000000 0 FILE LOCAL DEFAULT ABS usage.c
47: 0000000000000000 0 FILE LOCAL DEFAULT ABS version.c
48: 0000000000000000 0 FILE LOCAL DEFAULT ABS indent.c
49: 0000000000600fd0 4096 OBJECT LOCAL DEFAULT 24 indent.buf
50: 0000000000600d6c 0 NOTYPE LOCAL HIDDEN 18 __preinit_array_start
51: 0000000000600d6c 0 NOTYPE LOCAL HIDDEN 18 __fini_array_end
52: 0000000000600f38 0 OBJECT LOCAL HIDDEN 22 _GLOBAL_OFFSET_TABLE_
53: 0000000000600d6c 0 NOTYPE LOCAL HIDDEN 18 __preinit_array_end
54: 0000000000600d6c 0 NOTYPE LOCAL HIDDEN 18 __fini_array_start
55: 0000000000600d6c 0 NOTYPE LOCAL HIDDEN 18 __init_array_end
56: 0000000000600d6c 0 NOTYPE LOCAL HIDDEN 18 __init_array_start
57: 0000000000600d98 0 OBJECT LOCAL HIDDEN 21 _DYNAMIC
58: 0000000000600fc0 4 OBJECT GLOBAL DEFAULT 24 optind@@FBSD_1.0
59: 00000000004006e0 390 FUNC GLOBAL DEFAULT 13 _start
60: 0000000000000000 0 NOTYPE WEAK DEFAULT UND _Jv_RegisterClasses
61: 0000000000600f98 8 OBJECT GLOBAL DEFAULT 23 __progname
62: 0000000000601fd8 8 OBJECT GLOBAL DEFAULT 24 _usage_msg
63: 0000000000400ba8 0 FUNC GLOBAL HIDDEN 14 _fini
64: 0000000000400a10 160 FUNC GLOBAL DEFAULT 13 setmsg
65: 0000000000000000 188 FUNC GLOBAL DEFAULT UND printf@@FBSD_1.0
66: 0000000000000000 71 FUNC GLOBAL DEFAULT UND atexit@@FBSD_1.0
67: 0000000000000000 6 FUNC GLOBAL DEFAULT UND _init_tls@@FBSD_1.0
68: 0000000000000000 239 FUNC GLOBAL DEFAULT UND fprintf@@FBSD_1.0
69: 0000000000000000 617 FUNC GLOBAL DEFAULT UND getopt@@FBSD_1.0
70: 0000000000400b10 90 FUNC GLOBAL DEFAULT 13 indent
71: 0000000000600fa0 8 OBJECT GLOBAL HIDDEN 23 __dso_handle
72: 0000000000601fe0 8 OBJECT GLOBAL DEFAULT 24 _version_msg
73: 0000000000400af0 31 FUNC GLOBAL DEFAULT 13 version
74: 0000000000000000 3171 FUNC GLOBAL DEFAULT UND calloc@@FBSD_1.0
75: 0000000000000000 76 FUNC GLOBAL DEFAULT UND strncpy@@FBSD_1.0
76: 0000000000600fb1 0 NOTYPE GLOBAL DEFAULT ABS __bss_start
77: 0000000000601fd0 8 OBJECT GLOBAL DEFAULT 24 environ
78: 0000000000601fe8 0 NOTYPE GLOBAL DEFAULT ABS _end
79: 0000000000400ab0 52 FUNC GLOBAL DEFAULT 13 usage
80: 0000000000000000 54 FUNC GLOBAL DEFAULT UND exit@@FBSD_1.0
81: 0000000000600fb1 0 NOTYPE GLOBAL DEFAULT ABS _edata
82: 0000000000600fc8 8 OBJECT GLOBAL DEFAULT 24 __stderrp@@FBSD_1.0
83: 0000000000000000 126 FUNC GLOBAL DEFAULT UND strcmp@@FBSD_1.0
84: 0000000000400940 196 FUNC GLOBAL DEFAULT 13 main
85: 0000000000400628 0 FUNC GLOBAL HIDDEN 11 _init
Histogram for bucket list length (total of 3 buckets):
Length Number % of total Coverage
0 0 ( 0.0%) 0.0%
1 0 ( 0.0%) 0.0%
2 1 ( 33.3%) 13.3%
3 0 ( 0.0%) 13.3%
4 0 ( 0.0%) 13.3%
5 0 ( 0.0%) 13.3%
6 1 ( 33.3%) 53.3%
7 1 ( 33.3%) 100.0%
Histogram for bucket list length (total of 3 buckets):
Length Number % of total Coverage
0 0 ( 0.0%) 0.0%
1 1 ( 33.3%) 25.0%
2 2 ( 66.7%) 125.0%
Version symbol section (.gnu.version):
000: 0 *local* 0 *local* 2 FBSD_1.0 2 FBSD_1.0
004: 2 FBSD_1.0 2 FBSD_1.0 2 FBSD_1.0 2 FBSD_1.0
008: 2 FBSD_1.0 2 FBSD_1.0 2 FBSD_1.0 1 *global*
00c: 1 *global* 1 *global* 2 FBSD_1.0 2 FBSD_1.0
Version needed section (.gnu.version_r):
0x0000 vn_version: 1 vn_file: libc.so.7 vn_cnt: 1
0x0010 vna_name: FBSD_1.0 vna_flags: 0 vna_other: 2
%