File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 55# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
66# Delete our BB symbols so BOLT doesn't mark them as entry points
77# RUN: llvm-strip --strip-unneeded %t.o
8- # RUN: ld.lld %t.o -o %t.exe -q -shared -fini=_fini
8+ # RUN: ld.lld %t.o -o %t.exe -q -shared -fini=_fini -init=_init
99# RUN: llvm-bolt --instrument %t.exe --relocs -o %t.out
1010
1111 .text
@@ -48,6 +48,13 @@ _fini:
4848 hlt
4949 .size _fini, .-_fini
5050
51+ .globl _init
52+ .type _init, %function
53+ .p2align 4
54+ _init:
55+ retq
56+ .size _init, .-_init
57+
5158 .data
5259 .globl var
5360var:
Original file line number Diff line number Diff line change @@ -19,6 +19,13 @@ _start:
1919 ret
2020 .size _start, .-_start
2121
22+ .globl _init
23+ .type _init, %function
24+ # Force DT_INIT to be created (needed for instrumentation).
25+ _init:
26+ ret
27+ .size _init, .-_init
28+
2229 .globl _fini
2330 .type _fini, %function
2431 # Force DT_FINI to be created (needed for instrumentation).
You can’t perform that action at this time.
0 commit comments