zig/deps/lld/test/ELF/aarch64-abs64-dyn.s
Andrew Kelley 4794281d64 embed LLD 5.0.0
This is 48aaa9f66120f72b5d7e4a90b32fee40a3386ce9 from the
git monorepo.
2017-08-27 17:46:59 -04:00

28 lines
663 B
ArmAsm

// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
// Creates a R_AARCH64_ABS64 relocation against foo and bar
.globl foo
foo:
.global bar
.hidden bar
bar:
.data
.xword foo
.xword bar
// RUN: ld.lld -shared -o %t.so %t.o
// RUN: llvm-readobj -symbols -dyn-relocations %t.so | FileCheck %s
// CHECK: Dynamic Relocations {
// CHECK-NEXT: {{.*}} R_AARCH64_RELATIVE - [[BAR_ADDR:.*]]
// CHECK-NEXT: {{.*}} R_AARCH64_ABS64 foo 0x0
// CHECK-NEXT: }
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Name: bar
// CHECK-NEXT: Value: [[BAR_ADDR]]