[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / i386-got-and-copy.s
blob9c2f60f68929e7a54d0a955aee9150bf29516fb7
1 # REQUIRES: x86
3 # If there are two relocations such that the first one requires
4 # dynamic COPY relocation, the second one requires GOT entry
5 # creation, linker should create both - dynamic relocation
6 # and GOT entry.
8 # RUN: llvm-mc -filetype=obj -triple=i386-pc-linux \
9 # RUN: %S/Inputs/copy-in-shared.s -o %t.so.o
10 # RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t.o
11 # RUN: ld.lld %t.so.o -shared -o %t.so
12 # RUN: ld.lld --hash-style=sysv %t.o %t.so -o %t.exe
13 # RUN: llvm-readobj -r %t.exe | FileCheck %s
15 # CHECK: Relocations [
16 # CHECK-NEXT: Section (4) .rel.dyn {
17 # CHECK-NEXT: 0x{{[0-9A-F]+}} R_386_GLOB_DAT foo
18 # CHECK-NEXT: 0x{{[0-9A-F]+}} R_386_COPY foo
19 # CHECK-NEXT: }
20 # CHECK-NEXT: ]
22 .text
23 .global _start
24 _start:
25 movl $foo, (%esp) # R_386_32 - requires R_386_COPY relocation
26 movl foo@GOT, %eax # R_386_GOT32 - requires GOT entry