[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / dynamic-reloc-weak.s
blob8e4840bb4c4ba862b527eed77b372b1032ea16af
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/dynamic-reloc-weak.s -o %t2.o
4 // RUN: ld.lld -shared %t2.o -o %t2.so
5 // RUN: ld.lld %t.o %t2.so -o %t
6 // RUN: llvm-readobj -r %t | FileCheck %s
8 .globl _start
9 _start:
10 .type sym1,@function
11 .weak sym1
12 .long sym1@gotpcrel
14 .type sym2,@function
15 .weak sym2
16 .long sym2@plt
18 .type sym3,@function
19 .weak sym3
20 .quad sym3
22 .type sym4,@function
23 .weak sym4
24 .quad sym4
26 // Test that we produce dynamic relocation for every weak undefined symbol
27 // we found.
29 // CHECK: Relocations [
30 // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
31 // CHECK-NEXT: 0x{{.*}} R_X86_64_GLOB_DAT sym1 0x0
32 // CHECK-NEXT: }
33 // CHECK-NEXT: Section ({{.*}}) .rela.plt {
34 // CHECK-NEXT: 0x{{.*}} R_X86_64_JUMP_SLOT sym2 0x0
35 // CHECK-NEXT: 0x{{.*}} R_X86_64_JUMP_SLOT sym3 0x0
36 // CHECK-NEXT: }
37 // CHECK-NEXT: ]