From 715b04eda622ee836716423d94ee6fd1d6115a2e Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 8 Mar 2016 19:51:58 +0000 Subject: [PATCH] Use defined hidden symbols for out of range tests. When the symbol can be preempted the error is not entirely accurate. This just makes upcoming patches more readable. llvm-svn: 262954 --- lld/test/ELF/Inputs/ppc64-addr16-error.s | 3 +++ lld/test/ELF/Inputs/x86-64-reloc-error.s | 7 +++++++ lld/test/ELF/ppc64-addr16-error.s | 3 ++- lld/test/ELF/x86-64-reloc-error.s | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 lld/test/ELF/Inputs/ppc64-addr16-error.s create mode 100644 lld/test/ELF/Inputs/x86-64-reloc-error.s diff --git a/lld/test/ELF/Inputs/ppc64-addr16-error.s b/lld/test/ELF/Inputs/ppc64-addr16-error.s new file mode 100644 index 0000000..d83a9f9 --- /dev/null +++ b/lld/test/ELF/Inputs/ppc64-addr16-error.s @@ -0,0 +1,3 @@ +.global sym +.hidden sym +sym = 0 diff --git a/lld/test/ELF/Inputs/x86-64-reloc-error.s b/lld/test/ELF/Inputs/x86-64-reloc-error.s new file mode 100644 index 0000000..bce6f8f --- /dev/null +++ b/lld/test/ELF/Inputs/x86-64-reloc-error.s @@ -0,0 +1,7 @@ +.global big +.hidden big +big = 0x1000000000 + +.global foo +.hidden foo +foo = 0 diff --git a/lld/test/ELF/ppc64-addr16-error.s b/lld/test/ELF/ppc64-addr16-error.s index 57a919a..c731c6e 100644 --- a/lld/test/ELF/ppc64-addr16-error.s +++ b/lld/test/ELF/ppc64-addr16-error.s @@ -1,5 +1,6 @@ // RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t -// RUN: not ld.lld -shared %t -o %t2 2>&1 | FileCheck %s +// RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/ppc64-addr16-error.s -o %t2 +// RUN: not ld.lld -shared %t %t2 -o %t3 2>&1 | FileCheck %s // REQUIRES: ppc .short sym+65539 diff --git a/lld/test/ELF/x86-64-reloc-error.s b/lld/test/ELF/x86-64-reloc-error.s index bc91b96..9b7e17d 100644 --- a/lld/test/ELF/x86-64-reloc-error.s +++ b/lld/test/ELF/x86-64-reloc-error.s @@ -1,10 +1,10 @@ -// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/abs.s -o %tabs +// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/x86-64-reloc-error.s -o %tabs // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t // RUN: not ld.lld -shared %tabs %t -o %t2 2>&1 | FileCheck %s // REQUIRES: x86 movl $big, %edx - movq _start - 0x1000000000000, %rdx + movq $foo - 0x1000000000000, %rdx # CHECK: R_X86_64_32 out of range # CHECK: R_X86_64_32S out of range -- 2.7.4