1 // This test checks whether BOLT can correctly handle relocations against weak symbols.
3 // RUN
: %clang
%cflags
-Wl
,-z
,notext
-shared
-Wl
,-q
%s
-o
%t.so
4 // RUN
: llvm-bolt
%t.so
-o
%t.so.bolt
5 // RUN
: llvm-nm
-n
%t.so.bolt
> %t.out.txt
6 // RUN
: llvm-objdump
-z
-dj
.rodata %t.so.bolt >> %t.out.txt
7 // RUN
: FileCheck
%s
--input-file
=%t.out.txt
10 # CHECK: {{0+}}[[#%x,ADDR:]] W func_2
12 # CHECK: {{.*}} <.rodata>:
13 # CHECK-NEXT: {{.*}} .word 0x00000000
14 # CHECK-NEXT: {{.*}} .word 0x00000000
15 # CHECK-NEXT: {{.*}} .word 0x{{[0]+}}[[#ADDR]]
16 # CHECK-NEXT: {{.*}} .word 0x00000000
27 .type func_2, %function