2 #as
: --64 -mrelax
-relocations
=no
3 #ld
: -shared -m elf_x86_64
--no
-dynamic
-linker
4 #readelf
: -r
--wide
--dyn
-syms
6 Relocation section
'\.rela\.dyn' at offset
[0x0-9a
-f
]+ contains
2 entries
:
7 +Offset
+Info
+Type
+Symbol
's Value +Symbol's Name \
+ Addend
8 [0-9a
-f
]+ +[0-9a
-f
]+ +R_X86_64_GLOB_DAT
+0+ +func1 \
+ 0
9 [0-9a
-f
]+ +[0-9a
-f
]+ +R_X86_64_GLOB_DAT
+0+ +func2 \
+ 0
11 Relocation section
'\.rela\.plt' at offset
0x
[0-9a
-f
]+ contains
1 entries
:
12 +Offset
+Info
+Type
+Symbol
's Value +Symbol's Name \
+ Addend
13 [0-9a
-f
]+ +[0-9a
-f
]+ +R_X86_64_JUMP_SLOT
+0+ +func3 \
+ 0
15 Symbol table
'\.dynsym' contains
[0-9]+ entries
:
16 +Num
: +Value
+Size Type
+Bind
+Vis
+Ndx Name
18 +[0-9]+: +[a
-f0
-9]+ +0 +NOTYPE
+WEAK
+DEFAULT
+UND
+func
[0-9]?