[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / aarch64-data-relocs.s
blob438740c11c97195f38fc18bb3c7ec1a37244a266
1 // REQUIRES: aarch64
2 // RUN: llvm-mc -filetype=obj -triple=aarch64 %s -o %t.o
3 // RUN: llvm-mc -filetype=obj -triple=aarch64 %S/Inputs/abs256.s -o %t256.o
4 // RUN: ld.lld %t.o %t256.o -o %t
5 // RUN: llvm-objdump -s %t | FileCheck %s --check-prefixes=CHECK,LE
7 // RUN: llvm-mc -filetype=obj -triple=aarch64_be %s -o %t.be.o
8 // RUN: llvm-mc -filetype=obj -triple=aarch64_be %S/Inputs/abs256.s -o %t256.be.o
9 // RUN: ld.lld %t.be.o %t256.be.o -o %t.be
10 // RUN: llvm-objdump -s %t.be | FileCheck %s --check-prefixes=CHECK,BE
12 .globl _start
13 _start:
14 .section .R_AARCH64_ABS64, "ax",@progbits
15 .xword foo + 0x24
17 // S = 0x100, A = 0x24
18 // S + A = 0x124
19 // CHECK: Contents of section .R_AARCH64_ABS64:
20 // LE-NEXT: 210120 24010000 00000000
21 // BE-NEXT: 210120 00000000 00000124
23 .section .R_AARCH64_PREL64, "ax",@progbits
24 .xword foo - . + 0x24
26 // S + A - P = 0x100 + 0x24 - 0x210128 = 0xffffffffffdefffc
27 // CHECK: Contents of section .R_AARCH64_PREL64:
28 // LE-NEXT: 210128 fcffdeff ffffffff
29 // BE-NEXT: 210128 ffffffff ffdefffc