[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / weak-undef-rw.s
blobec3e4ce7348957e40ba9659a694ec1b51dd6ce0f
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: ld.lld %t.o -o %t --export-dynamic
4 # RUN: llvm-readelf -r --hex-dump=.data %t | FileCheck %s --check-prefix=NOPIC
5 # RUN: ld.lld %t.o -o %t.pie -pie
6 # RUN: llvm-readobj -r %t.pie | FileCheck %s --check-prefix=PIC
7 # RUN: ld.lld %t.o -o %t.so -shared
8 # RUN: llvm-readobj -r %t.so | FileCheck %s --check-prefix=PIC
10 ## gABI leaves the behavior of weak undefined references implementation defined.
11 ## We choose to resolve them statically for -no-pie and produce dynamic relocations
12 ## for -pie and -shared.
14 ## Note: Some ports of GNU ld support -z nodynamic-undefined-weak that we don't
15 ## implement.
17 # NOPIC: no relocations
18 # NOPIC: Hex dump of section '.data':
19 # NOPIC-NEXT: {{.*}} 00000000 00000000
20 # NOPIC-EMPTY:
22 # PIC: .rela.dyn {
23 # PIC-NEXT: R_X86_64_64 foobar 0x0
24 # PIC-NEXT: }
26 .global _start
27 _start:
28 .data
29 .weak foobar
30 .quad foobar