29 lines · plain
1# REQUIRES: x862 3## On some targets (e.g. ARM, AArch64, and PPC), PC relative relocations to4## weak undefined symbols resolve to special positions. On many others5## the target symbols as treated as VA 0. Absolute relocations are always 6## resolved as VA 0.7 8# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o9# RUN: ld.lld %t.o -o %t10 11# RUN: llvm-objdump -d --no-show-raw-insn --print-imm-hex %t | FileCheck %s --check-prefix=TEXT12# TEXT: 201158: movl $0x1, -0x201162(%rip)13 14# RUN: llvm-readelf -r --hex-dump=.data %t | FileCheck %s --check-prefix=DATA15# DATA: Hex dump of section '.data':16# DATA-NEXT: {{.*}} 00000000 00000000 17# DATA-EMPTY:18 19# RUN: llvm-readelf -r %t | FileCheck %s --check-prefix=NORELCS20# NORELCS: no relocations21 22.global _start23_start:24 movl $1, sym1(%rip)25 26.data27.weak sym128.quad sym129