[llvm-branch-commits] [lld] 15bf939 - [ELF][test] Fix ppc64-reloc-pcrel34-overflow.s

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 3 06:42:35 PDT 2020


Author: Fangrui Song
Date: 2020-08-03T15:39:14+02:00
New Revision: 15bf939137283027fae04e7da8c018346657b254

URL: https://github.com/llvm/llvm-project/commit/15bf939137283027fae04e7da8c018346657b254
DIFF: https://github.com/llvm/llvm-project/commit/15bf939137283027fae04e7da8c018346657b254.diff

LOG: [ELF][test] Fix ppc64-reloc-pcrel34-overflow.s

(cherry picked from commit ed7bde0e4b40cbf8a7c833fd8240c957fcda176e)

Added: 
    

Modified: 
    lld/test/ELF/ppc64-reloc-pcrel34-overflow.s

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/ppc64-reloc-pcrel34-overflow.s b/lld/test/ELF/ppc64-reloc-pcrel34-overflow.s
index a97160a430dd..ad80ed720b63 100644
--- a/lld/test/ELF/ppc64-reloc-pcrel34-overflow.s
+++ b/lld/test/ELF/ppc64-reloc-pcrel34-overflow.s
@@ -1,21 +1,22 @@
 # REQUIRES: ppc
 # RUN: echo 'SECTIONS { \
-# RUN:       .text_low 0x10010000: { *(.text_low) } \
-# RUN:       .text_overflow 0x1000000000 : { *(.text_overflow) } \
-# RUN:       }' > %t.script
+# RUN:   .text 0x10000: { *(.text) } \
+# RUN:   .data 0x200010000 : { *(.data) } \
+# RUN: }' > %t.script
 
 # RUN: llvm-mc -filetype=obj -triple=powerpc64le %s -o %t.o
-# RUN: not ld.lld -T %t.script %t.o -o %t
+# RUN: not ld.lld -T %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
 
 # RUN: llvm-mc -filetype=obj -triple=powerpc64 %s -o %t.o
-# RUN: not ld.lld -T %t.script %t.o -o %t
+# RUN: not ld.lld -T %t.script %t.o -o /dev/null 2>&1 | FileCheck %s
 
-.section .text_low, "ax", %progbits
-# CHECK: relocation R_PPC64_PCREL34 out of range
-GlobIntOverflow:
+# CHECK: relocation R_PPC64_PCREL34 out of range: 8589934592 is not in [-8589934592, 8589934591]
 	plwa 3, glob_overflow at PCREL(0), 1
-	blr
-.section .text_overflow, "ax", %progbits
+
+# CHECK-NOT: relocation
+	plwa 3, .data at PCREL(0), 1
+
+.data
 glob_overflow:
 	.long	0
 	.size	glob_overflow, 4


        


More information about the llvm-branch-commits mailing list