[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / x86-64-gotpc-relax-und-dso.s
blob329b1db8096310d27f6719090c306fac56f5ef86
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-pc-linux %S/Inputs/gotpc-relax-und-dso.s -o %tdso.o
4 # RUN: ld.lld -shared %tdso.o -soname=t.so -o %t.so
5 # RUN: ld.lld --hash-style=sysv -shared %t.o %t.so -o %t
6 # RUN: llvm-readobj -r -S %t | FileCheck --check-prefix=RELOC %s
7 # RUN: llvm-objdump --no-print-imm-hex -d %t | FileCheck --check-prefix=DISASM %s
9 # RELOC: Relocations [
10 # RELOC-NEXT: Section ({{.*}}) .rela.dyn {
11 # RELOC-NEXT: R_X86_64_GLOB_DAT foo 0x0
12 # RELOC-NEXT: R_X86_64_GLOB_DAT und 0x0
13 # RELOC-NEXT: R_X86_64_GLOB_DAT dsofoo 0x0
14 # RELOC-NEXT: }
15 # RELOC-NEXT: ]
17 # 0x101e + 7 - 36 = 0x1001
18 # 0x1025 + 7 - 43 = 0x1001
19 # DISASM: Disassembly of section .text:
20 # DISASM-EMPTY:
21 # DISASM-NEXT: <foo>:
22 # DISASM-NEXT: nop
23 # DISASM: <hid>:
24 # DISASM-NEXT: nop
25 # DISASM: <_start>:
26 # DISASM-NEXT: movq 4375(%rip), %rax
27 # DISASM-NEXT: movq 4368(%rip), %rax
28 # DISASM-NEXT: movq 4369(%rip), %rax
29 # DISASM-NEXT: movq 4362(%rip), %rax
30 # DISASM-NEXT: leaq -36(%rip), %rax
31 # DISASM-NEXT: leaq -43(%rip), %rax
32 # DISASM-NEXT: movq 4325(%rip), %rax
33 # DISASM-NEXT: movq 4318(%rip), %rax
34 # DISASM-NEXT: movq 4319(%rip), %rax
35 # DISASM-NEXT: movq 4312(%rip), %rax
36 # DISASM-NEXT: movq 4313(%rip), %rax
37 # DISASM-NEXT: movq 4306(%rip), %rax
38 # DISASM-NEXT: leaq -92(%rip), %rax
39 # DISASM-NEXT: leaq -99(%rip), %rax
40 # DISASM-NEXT: movq 4269(%rip), %rax
41 # DISASM-NEXT: movq 4262(%rip), %rax
43 .text
44 .globl foo
45 .type foo, @function
46 foo:
47 nop
49 .globl hid
50 .hidden hid
51 .type hid, @function
52 hid:
53 nop
55 .globl _start
56 .type _start, @function
57 _start:
58 movq und@GOTPCREL(%rip), %rax
59 movq und@GOTPCREL(%rip), %rax
60 movq dsofoo@GOTPCREL(%rip), %rax
61 movq dsofoo@GOTPCREL(%rip), %rax
62 movq hid@GOTPCREL(%rip), %rax
63 movq hid@GOTPCREL(%rip), %rax
64 movq foo@GOTPCREL(%rip), %rax
65 movq foo@GOTPCREL(%rip), %rax
66 movq und@GOTPCREL(%rip), %rax
67 movq und@GOTPCREL(%rip), %rax
68 movq dsofoo@GOTPCREL(%rip), %rax
69 movq dsofoo@GOTPCREL(%rip), %rax
70 movq hid@GOTPCREL(%rip), %rax
71 movq hid@GOTPCREL(%rip), %rax
72 movq foo@GOTPCREL(%rip), %rax
73 movq foo@GOTPCREL(%rip), %rax