]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/aarch64-data-relocs.s
Vendor import of lld trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / test / ELF / aarch64-data-relocs.s
1 // REQUIRES: aarch64
2 // RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t
3 // RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %S/Inputs/abs256.s -o %t256.o
4 // RUN: ld.lld %t %t256.o -o %t2
5 // RUN: llvm-objdump -s %t2 | FileCheck %s
6
7 .globl _start
8 _start:
9 .section .R_AARCH64_ABS64, "ax",@progbits
10   .xword foo + 0x24
11
12 // S = 0x100, A = 0x24
13 // S + A = 0x124
14 // CHECK: Contents of section .R_AARCH64_ABS64:
15 // CHECK-NEXT: 210000 24010000 00000000
16
17 .section .R_AARCH64_PREL64, "ax",@progbits
18   .xword foo - . + 0x24
19
20 // S = 0x100, A = 0x24, P = 0x20008
21 // S + A - P = 0xfffffffffffe011c
22 // CHECK: Contents of section .R_AARCH64_PREL64:
23 // CHECK-NEXT: 210008 1c01dfff ffffffff