[lld] r249634 - [ELF/AArch64] Add tests to verify we handle overflow correctly for relocs.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 16:15:22 PDT 2015
Author: davide
Date: Wed Oct 7 18:15:22 2015
New Revision: 249634
URL: http://llvm.org/viewvc/llvm-project?rev=249634&view=rev
Log:
[ELF/AArch64] Add tests to verify we handle overflow correctly for relocs.
Added:
lld/trunk/test/elf2/aarch64-hi21-error.s
lld/trunk/test/elf2/aarch64-lo21-error.s
Added: lld/trunk/test/elf2/aarch64-hi21-error.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/aarch64-hi21-error.s?rev=249634&view=auto
==============================================================================
--- lld/trunk/test/elf2/aarch64-hi21-error.s (added)
+++ lld/trunk/test/elf2/aarch64-hi21-error.s Wed Oct 7 18:15:22 2015
@@ -0,0 +1,8 @@
+// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs
+// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t
+// RUN: not ld.lld2 %tabs -shared %t -o %t2 2>&1 | FileCheck %s
+// REQUIRES: aarch64
+
+adrp x0, big
+
+#CHECK: R_AARCH64_ADR_PREL_PG_HI21 out of range
Added: lld/trunk/test/elf2/aarch64-lo21-error.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/aarch64-lo21-error.s?rev=249634&view=auto
==============================================================================
--- lld/trunk/test/elf2/aarch64-lo21-error.s (added)
+++ lld/trunk/test/elf2/aarch64-lo21-error.s Wed Oct 7 18:15:22 2015
@@ -0,0 +1,8 @@
+// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %S/Inputs/abs.s -o %tabs
+// RUN: llvm-mc -filetype=obj -triple=aarch64-pc-freebsd %s -o %t
+// RUN: not ld.lld2 %tabs -shared %t -o %t2 2>&1 | FileCheck %s
+// REQUIRES: aarch64
+
+adr x0, big
+
+#CHECK: R_AARCH64_ADR_PREL_LO21 out of range
More information about the llvm-commits
mailing list