diff options
Diffstat (limited to 'test/ELF/aarch64-prel32.s')
-rw-r--r-- | test/ELF/aarch64-prel32.s | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/ELF/aarch64-prel32.s b/test/ELF/aarch64-prel32.s index 7aa290382c53..16c8bb3c2019 100644 --- a/test/ELF/aarch64-prel32.s +++ b/test/ELF/aarch64-prel32.s @@ -7,8 +7,8 @@ .globl _start _start: .data - .word foo - . + 0x100010eff - .word foo - . - 0x7ffef0fc + .word foo - . + 0x100200eff + .word foo - . - 0x7fdff0fc // Note: If this test fails, it probably happens because of // the change of the address of the .data section. @@ -18,14 +18,14 @@ _start: // RUN: llvm-objdump -s -section=.data %t2 | FileCheck %s // CHECK: Contents of section .data: -// 11000: S = 0x100, A = 0x100010eff, P = 0x11000 -// S + A - P = 0xffffffff -// 11004: S = 0x100, A = -0x7ffef0fc, P = 0x11004 -// S + A - P = 0x80000000 -// CHECK-NEXT: 11000 ffffffff 00000080 +// 201000: S = 0x100, A = 0x100200eff, P = 0x201000 +// S + A - P = 0xffffffff +// 201004: S = 0x100, A = -0x7fdff0fc, P = 0x201004 +// S + A - P = 0x80000000 +// CHECK-NEXT: 201000 ffffffff 00000080 -// RUN: not ld.lld %t.o %t255.o -o %t2 -// | FileCheck %s --check-prefix=OVERFLOW -// RUN: not ld.lld %t.o %t257.o -o %t2 -// | FileCheck %s --check-prefix=OVERFLOW -// OVERFLOW: Relocation R_AARCH64_PREL32 out of range: 18446744071562006527 is not in [-2147483648, 4294967295] +// RUN: not ld.lld -z max-page-size=4096 %t.o %t255.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW1 +// OVERFLOW1: relocation R_AARCH64_PREL32 out of range: -2147483649 is not in [-2147483648, 2147483647] + +// RUN: not ld.lld -z max-page-size=4096 %t.o %t257.o -o %t2 2>&1 | FileCheck %s --check-prefix=OVERFLOW2 +// OVERFLOW2: relocation R_AARCH64_PREL32 out of range: 4294967296 is not in [-2147483648, 2147483647] |