[lld] r249255 - [ELF2/AArch64] R_AARCH64_ABS{16,32} can fail.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 3 18:08:58 PDT 2015


Author: davide
Date: Sat Oct  3 20:08:58 2015
New Revision: 249255

URL: http://llvm.org/viewvc/llvm-project?rev=249255&view=rev
Log:
[ELF2/AArch64] R_AARCH64_ABS{16,32} can fail.

Add tests to ensure we handle this case this case gracefully.

Added:
    lld/trunk/test/elf2/aarch64-abs16-error.s
    lld/trunk/test/elf2/aarch64-abs32-error.s

Added: lld/trunk/test/elf2/aarch64-abs16-error.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/aarch64-abs16-error.s?rev=249255&view=auto
==============================================================================
--- lld/trunk/test/elf2/aarch64-abs16-error.s (added)
+++ lld/trunk/test/elf2/aarch64-abs16-error.s Sat Oct  3 20:08:58 2015
@@ -0,0 +1,7 @@
+// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t
+// RUN: not lld -flavor gnu2 -shared %t -o %t2 2>&1 | FileCheck %s
+// REQUIRES: aarch64
+
+.hword sym+65539
+
+// CHECK: R_AARCH64_ABS16 out of range

Added: lld/trunk/test/elf2/aarch64-abs32-error.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/aarch64-abs32-error.s?rev=249255&view=auto
==============================================================================
--- lld/trunk/test/elf2/aarch64-abs32-error.s (added)
+++ lld/trunk/test/elf2/aarch64-abs32-error.s Sat Oct  3 20:08:58 2015
@@ -0,0 +1,7 @@
+// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t
+// RUN: not lld -flavor gnu2 -shared %t -o %t2 2>&1 | FileCheck %s
+// REQUIRES: aarch64
+
+.word sym+99999999999
+
+// CHECK: R_AARCH64_ABS32 out of range




More information about the llvm-commits mailing list