2016-02-24 00:54:40 +08:00
|
|
|
// REQUIRES: aarch64
|
|
|
|
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-linux %s -o %t.o
|
|
|
|
|
2016-02-24 04:19:44 +08:00
|
|
|
// Creates a R_AARCH64_ABS64 relocation against foo and bar
|
|
|
|
.globl foo
|
|
|
|
foo:
|
|
|
|
|
|
|
|
.global bar
|
|
|
|
.hidden bar
|
|
|
|
bar:
|
|
|
|
|
|
|
|
.data
|
|
|
|
.xword foo
|
|
|
|
.xword bar
|
2016-02-24 00:54:40 +08:00
|
|
|
|
|
|
|
// RUN: ld.lld -shared -o %t.so %t.o
|
|
|
|
// RUN: llvm-readobj -symbols -dyn-relocations %t.so | FileCheck %s
|
|
|
|
|
2016-02-24 04:19:44 +08:00
|
|
|
// CHECK: Dynamic Relocations {
|
|
|
|
// CHECK-NEXT: {{.*}} R_AARCH64_RELATIVE - [[BAR_ADDR:.*]]
|
2016-05-10 23:47:57 +08:00
|
|
|
// CHECK-NEXT: {{.*}} R_AARCH64_ABS64 foo 0x0
|
2016-02-24 04:19:44 +08:00
|
|
|
// CHECK-NEXT: }
|
2016-02-24 00:54:40 +08:00
|
|
|
|
2016-02-24 04:19:44 +08:00
|
|
|
// CHECK: Symbols [
|
|
|
|
// CHECK: Symbol {
|
|
|
|
// CHECK: Name: bar
|
|
|
|
// CHECK-NEXT: Value: [[BAR_ADDR]]
|