[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / aarch64-movw-error.s
blob0a008adbd9e85b6db86003206a4c30d53b7d3335
1 # REQUIRES: aarch64
2 # RUN: llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd %s -o %t
3 # RUN: echo '.globl zero; zero = 0' | llvm-mc -filetype=obj -triple=aarch64-unknown-freebsd -o %t2.o
4 # RUN: not ld.lld %t %t2.o -o /dev/null 2>&1 | FileCheck %s
6 # CHECK: relocation R_AARCH64_MOVW_UABS_G0 out of range: 65536 is not in [0, 65535]
7 movn x0, #:abs_g0:zero+0x10000
8 # CHECK: relocation R_AARCH64_MOVW_UABS_G1 out of range: 4294967296 is not in [0, 4294967295]
9 movn x0, #:abs_g1:zero+0x100000000
10 # CHECK: relocation R_AARCH64_MOVW_UABS_G2 out of range: 281474976710656 is not in [0, 281474976710655]
11 movn x0, #:abs_g2:zero+0x1000000000000
12 # CHECK: relocation R_AARCH64_MOVW_SABS_G0 out of range: 65536 is not in [-65536, 65535]
13 movn x0, #:abs_g0_s:zero+0x10000
14 # CHECK: relocation R_AARCH64_MOVW_SABS_G1 out of range: 4294967296 is not in [-4294967296, 4294967295]
15 movn x0, #:abs_g1_s:zero+0x100000000
16 # CHECK: relocation R_AARCH64_MOVW_SABS_G2 out of range: 281474976710656 is not in [-281474976710656, 281474976710655]
17 movn x0, #:abs_g2_s:zero+0x1000000000000
18 # CHECK: relocation R_AARCH64_MOVW_SABS_G0 out of range: -65537 is not in [-65536, 65535]
19 movn x0, #:abs_g0_s:zero-0x10001
20 # CHECK: relocation R_AARCH64_MOVW_SABS_G1 out of range: -4295032832 is not in [-4294967296, 4294967295]
21 movn x0, #:abs_g1_s:zero-0x100010000
22 # CHECK: relocation R_AARCH64_MOVW_SABS_G2 out of range: -281479271677952 is not in [-281474976710656, 281474976710655]
23 movn x0, #:abs_g2_s:zero-0x1000100000000
25 # CHECK: relocation R_AARCH64_MOVW_PREL_G0 out of range: 65536 is not in [-65536, 65535]; references section '.text'
26 movn x0, #:prel_g0:.+0x10000
27 # CHECK: relocation R_AARCH64_MOVW_PREL_G1 out of range: 4294967296 is not in [-4294967296, 4294967295]
28 movn x0, #:prel_g1:.+0x100000000
29 # CHECK: relocation R_AARCH64_MOVW_PREL_G2 out of range: 281474976710656 is not in [-281474976710656, 281474976710655]
30 movn x0, #:prel_g2:.+0x1000000000000
31 # CHECK: relocation R_AARCH64_MOVW_PREL_G0 out of range: -65537 is not in [-65536, 65535]
32 movn x0, #:prel_g0:.-0x10001
33 # CHECK: relocation R_AARCH64_MOVW_PREL_G1 out of range: -4295032832 is not in [-4294967296, 4294967295]
34 movn x0, #:prel_g1:.-0x100010000
35 # CHECK: relocation R_AARCH64_MOVW_PREL_G2 out of range: -281479271677952 is not in [-281474976710656, 281474976710655]
36 movn x0, #:prel_g2:.-0x1000100000000
38 movz x0, #:tprel_g0: v1
39 # CHECK: relocation R_AARCH64_TLSLE_MOVW_TPREL_G0 out of range: 65552 is not in [-65536, 65535]; references 'v1'
40 movz x0, #:tprel_g1: v2
41 # CHECK: relocation R_AARCH64_TLSLE_MOVW_TPREL_G1 out of range: 4295032848 is not in [-4294967296, 4294967295]; references 'v2'
42 movz x0, #:tprel_g2: v3
43 # CHECK: relocation R_AARCH64_TLSLE_MOVW_TPREL_G2 out of range: 281479271743496 is not in [-281474976710656, 281474976710655]; references 'v3'
45 .section .tbss,"awT",@nobits
46 .balign 16
47 .space 0x10000
48 v1:
49 .quad 0
50 .space 0x100000000 - 8
51 v2:
52 .quad 0
53 .space 0x1000000000000 - 16
54 v3:
55 .quad 0