28 lines · plain
1// REQUIRES: aarch642// RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o3// RUN: ld.lld %t.o -o %t.so -shared --noinhibit-exec 2>&1 | FileCheck %s --check-prefix=WARN4// RUN: llvm-readelf -S %t.so | FileCheck --check-prefix=SEC %s5// RUN: llvm-objdump --no-print-imm-hex -s -d %t.so | FileCheck %s6 7// SEC: .got PROGBITS 00000000000203908 9 .section .data10 .globl bar11bar:12 13 .globl _start14_start: // PC = 0x303a015// bar@GOTPCREL = 0x20390 (got entry for `bar`) - 0x303a0 (.) = 0xf0fffeff16// bar@GOTPCREL+4 = 0x20390 (got entry for `bar`) - 0x303a4 (.) + 4 = 0xf0fffeff17// bar@GOTPCREL-4 = 0x20390 (got entry for `bar`) - 0x303a8 (.) - 4 = 0xe4fffeff18// CHECK: Contents of section .data:19// CHECK-NEXT: {{.*}} f0fffeff f0fffeff e4fffeff20 .word bar@GOTPCREL21 .word bar@GOTPCREL+422 .word bar@GOTPCREL-423 24// WARN: relocation R_AARCH64_GOTPCREL32 out of range: {{.*}} is not in [-2147483648, 2147483647]; references 'baz'25// WARN: relocation R_AARCH64_GOTPCREL32 out of range: {{.*}} is not in [-2147483648, 2147483647]; references 'baz'26 .word baz@GOTPCREL+0xffffffff27 .word baz@GOTPCREL-0xffffffff28