[Clang] replace 'bitfield' with 'bit-field' for consistency (#117881)
[llvm-project.git] / lld / test / ELF / relocation-undefined-weak.s
blob209dda7c342bc88a6838a9ec969b75ae2feb703f
1 # REQUIRES: x86
3 ## On some targets (e.g. ARM, AArch64, and PPC), PC relative relocations to
4 ## weak undefined symbols resolve to special positions. On many others
5 ## the target symbols as treated as VA 0. Absolute relocations are always
6 ## resolved as VA 0.
8 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
9 # RUN: ld.lld %t.o -o %t
11 # RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s --check-prefix=TEXT
12 # TEXT: 201158: movl $0x1, -0x201162(%rip)
14 # RUN: llvm-readelf -r --hex-dump=.data %t | FileCheck %s --check-prefix=DATA
15 # DATA: Hex dump of section '.data':
16 # DATA-NEXT: {{.*}} 00000000 00000000
17 # DATA-EMPTY:
19 # RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=NORELCS
20 # NORELCS: no relocations
22 .global _start
23 _start:
24 movl $1, sym1(%rip)
26 .data
27 .weak sym1
28 .quad sym1