brintos

brintos / llvm-project-archived public Read only

0
0
Text · 789 B · 46819e8 Raw
35 lines · plain
1// This test checks whether BOLT can correctly handle relocations against weak symbols.2 3// RUN: %clang %cflags -Wl,-z,notext -shared -Wl,-q %s -o %t.so4// RUN: llvm-bolt %t.so -o %t.so.bolt5// RUN: llvm-nm -n %t.so.bolt > %t.out.txt6// RUN: llvm-objdump -z -dj .rodata %t.so.bolt >> %t.out.txt7// RUN: FileCheck %s --input-file=%t.out.txt8 9# CHECK: w func_110# CHECK: {{0+}}[[#%x,ADDR:]] W func_211 12# CHECK: {{.*}} <.rodata>:13# CHECK-NEXT: {{.*}} .word 0x0000000014# CHECK-NEXT: {{.*}} .word 0x0000000015# CHECK-NEXT: {{.*}} .word 0x{{[0]+}}[[#ADDR]]16# CHECK-NEXT: {{.*}} .word 0x0000000017 18	.text19	.weak	func_220	.weak	func_121	.global	wow22	.type	wow, %function23wow:24	bl func_125	bl func_226	ret27	.type   func_2, %function28func_2:29	ret30	.section	.rodata31.LC0:32	.xword	func_133.LC1:34	.xword	func_235