[lld] r300120 - Make a few tests shorter. NFC.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 15:38:02 PDT 2017
Author: ruiu
Date: Wed Apr 12 17:38:02 2017
New Revision: 300120
URL: http://llvm.org/viewvc/llvm-project?rev=300120&view=rev
Log:
Make a few tests shorter. NFC.
Modified:
lld/trunk/test/ELF/linkerscript/at.s
lld/trunk/test/ELF/linkerscript/memory.s
lld/trunk/test/ELF/linkerscript/numbers.s
lld/trunk/test/ELF/linkerscript/outsections-addr.s
lld/trunk/test/ELF/linkerscript/page-size.s
lld/trunk/test/ELF/linkerscript/sections-sort.s
lld/trunk/test/ELF/linkerscript/symbol-assignexpr.s
Modified: lld/trunk/test/ELF/linkerscript/at.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/at.s?rev=300120&r1=300119&r2=300120&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/at.s (original)
+++ lld/trunk/test/ELF/linkerscript/at.s Wed Apr 12 17:38:02 2017
@@ -2,26 +2,11 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: echo "SECTIONS { \
# RUN: . = 0x1000; \
-# RUN: .aaa : AT(0x2000) \
-# RUN: { \
-# RUN: *(.aaa) \
-# RUN: } \
-# RUN: .bbb : \
-# RUN: { \
-# RUN: *(.bbb) \
-# RUN: } \
-# RUN: .ccc : AT(0x3000) \
-# RUN: { \
-# RUN: *(.ccc) \
-# RUN: } \
-# RUN: .ddd : AT(0x4000) \
-# RUN: { \
-# RUN: *(.ddd) \
-# RUN: } \
-# RUN: .eee 0x5000 : AT(0x5000) \
-# RUN: { \
-# RUN: *(.eee) \
-# RUN: } \
+# RUN: .aaa : AT(0x2000) { *(.aaa) } \
+# RUN: .bbb : { *(.bbb) } \
+# RUN: .ccc : AT(0x3000) { *(.ccc) } \
+# RUN: .ddd : AT(0x4000) { *(.ddd) } \
+# RUN: .eee 0x5000 : AT(0x5000) { *(.eee) } \
# RUN: }" > %t.script
# RUN: ld.lld %t --script %t.script -o %t2
# RUN: llvm-readobj -program-headers %t2 | FileCheck %s
Modified: lld/trunk/test/ELF/linkerscript/memory.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/memory.s?rev=300120&r1=300119&r2=300120&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/memory.s (original)
+++ lld/trunk/test/ELF/linkerscript/memory.s Wed Apr 12 17:38:02 2017
@@ -3,16 +3,10 @@
## Check simple RAM-only memory region.
-# RUN: echo "MEMORY { \
-# RUN: ram (rwx) : ORIGIN = 0x8000, LENGTH = 256K \
-# RUN: } \
+# RUN: echo "MEMORY { ram (rwx) : ORIGIN = 0x8000, LENGTH = 256K } \
# RUN: SECTIONS { \
-# RUN: .text : { \
-# RUN: *(.text) \
-# RUN: } > ram \
-# RUN: .data : { \
-# RUN: *(.data) \
-# RUN: } > ram \
+# RUN: .text : { *(.text) } > ram \
+# RUN: .data : { *(.data) } > ram \
# RUN: }" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix=RAM %s
@@ -27,12 +21,8 @@
# RUN: rom (rx) : org = 0x80000000, len = 64M \
# RUN: } \
# RUN: SECTIONS { \
-# RUN: .text : { \
-# RUN: *(.text) \
-# RUN: } > rom \
-# RUN: .data : { \
-# RUN: *(.data) \
-# RUN: } > ram \
+# RUN: .text : { *(.text) } > rom \
+# RUN: .data : { *(.data) } > ram \
# RUN: }" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix=RAMROM %s
@@ -47,12 +37,8 @@
# RUN: rom (rx) : o = 0x80000000, l = 64M \
# RUN: } \
# RUN: SECTIONS { \
-# RUN: .text : { \
-# RUN: *(.text) \
-# RUN: } \
-# RUN: .data : { \
-# RUN: *(.data) \
-# RUN: } > ram \
+# RUN: .text : { *(.text) } \
+# RUN: .data : { *(.data) } > ram \
# RUN: }" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t
# RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix=ATTRS %s
@@ -83,16 +69,10 @@
## Check no region available.
-# RUN: echo "MEMORY { \
-# RUN: ram (!rx) : ORIGIN = 0x8000, LENGTH = 256K \
-# RUN: } \
+# RUN: echo "MEMORY { ram (!rx) : ORIGIN = 0x8000, LENGTH = 256K } \
# RUN: SECTIONS { \
-# RUN: .text : { \
-# RUN: *(.text) \
-# RUN: } \
-# RUN: .data : { \
-# RUN: *(.data) \
-# RUN: } > ram \
+# RUN: .text : { *(.text) } \
+# RUN: .data : { *(.data) } > ram \
# RUN: }" > %t.script
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
# RUN: | FileCheck -check-prefix=ERR4 %s
@@ -107,16 +87,10 @@
## Check region overflow.
-# RUN: echo "MEMORY { \
-# RUN: ram (rwx) : ORIGIN = 0x0, LENGTH = 2K \
-# RUN: } \
+# RUN: echo "MEMORY { ram (rwx) : ORIGIN = 0x0, LENGTH = 2K } \
# RUN: SECTIONS { \
-# RUN: .text : { \
-# RUN: *(.text) \
-# RUN: } > ram \
-# RUN: .data : { \
-# RUN: *(.data) \
-# RUN: } > ram \
+# RUN: .text : { *(.text) } > ram \
+# RUN: .data : { *(.data) } > ram \
# RUN: }" > %t.script
# RUN: not ld.lld -o %t2 --script %t.script %t 2>&1 \
# RUN: | FileCheck -check-prefix=ERR6 %s
Modified: lld/trunk/test/ELF/linkerscript/numbers.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/numbers.s?rev=300120&r1=300119&r2=300120&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/numbers.s (original)
+++ lld/trunk/test/ELF/linkerscript/numbers.s Wed Apr 12 17:38:02 2017
@@ -28,23 +28,17 @@
# CHECK-NEXT: 6 .mega2 00000008 0000000000200000
## Mailformed number errors.
-# RUN: echo "SECTIONS { \
-# RUN: . = 0x11h; \
-# RUN: }" > %t2.script
+# RUN: echo "SECTIONS { . = 0x11h; }" > %t2.script
# RUN: not ld.lld %t --script %t2.script -o %t3 2>&1 | \
# RUN: FileCheck --check-prefix=ERR1 %s
# ERR1: malformed number: 0x11h
-# RUN: echo "SECTIONS { \
-# RUN: . = 0x11k; \
-# RUN: }" > %t3.script
+# RUN: echo "SECTIONS { . = 0x11k; }" > %t3.script
# RUN: not ld.lld %t --script %t3.script -o %t4 2>&1 | \
# RUN: FileCheck --check-prefix=ERR2 %s
# ERR2: malformed number: 0x11k
-# RUN: echo "SECTIONS { \
-# RUN: . = 0x11m; \
-# RUN: }" > %t4.script
+# RUN: echo "SECTIONS { . = 0x11m; }" > %t4.script
# RUN: not ld.lld %t --script %t4.script -o %t5 2>&1 | \
# RUN: FileCheck --check-prefix=ERR3 %s
# ERR3: malformed number: 0x11m
Modified: lld/trunk/test/ELF/linkerscript/outsections-addr.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/outsections-addr.s?rev=300120&r1=300119&r2=300120&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/outsections-addr.s (original)
+++ lld/trunk/test/ELF/linkerscript/outsections-addr.s Wed Apr 12 17:38:02 2017
@@ -1,22 +1,10 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-# RUN: echo "SECTIONS { \
-# RUN: .aaa 0x2000 : \
-# RUN: { \
-# RUN: *(.aaa) \
-# RUN: } \
-# RUN: .bbb 0x1 ? 0x3000 : 0x4000 : \
-# RUN: { \
-# RUN: *(.bbb) \
-# RUN: } \
-# RUN: .ccc ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) : \
-# RUN: { \
-# RUN: *(.ccc) \
-# RUN: } \
-# RUN: .ddd 0x5001 : \
-# RUN: { \
-# RUN: *(.ddd) \
-# RUN: } \
+# RUN: echo "SECTIONS { \
+# RUN: .aaa 0x2000 : { *(.aaa) } \
+# RUN: .bbb 0x1 ? 0x3000 : 0x4000 : { *(.bbb) } \
+# RUN: .ccc ALIGN(CONSTANT(MAXPAGESIZE)) + (. & (CONSTANT(MAXPAGESIZE) - 1)) : { *(.ccc) } \
+# RUN: .ddd 0x5001 : { *(.ddd) } \
# RUN: }" > %t.script
# RUN: ld.lld %t --script %t.script -o %tout
# RUN: llvm-readobj -s %tout | FileCheck %s
Modified: lld/trunk/test/ELF/linkerscript/page-size.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/page-size.s?rev=300120&r1=300119&r2=300120&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/page-size.s (original)
+++ lld/trunk/test/ELF/linkerscript/page-size.s Wed Apr 12 17:38:02 2017
@@ -44,9 +44,7 @@
# CHECK-NEXT: Alignment: 16384
# CHECK-NEXT: }
-# RUN: echo "SECTIONS { \
-# RUN: symbol = CONSTANT(MAXPAGESIZE); \
-# RUN: }" > %t.script
+# RUN: echo "SECTIONS { symbol = CONSTANT(MAXPAGESIZE); }" > %t.script
# RUN: ld.lld -z max-page-size=0x4000 -o %t1 --script %t.script %t
# RUN: llvm-objdump -t %t1 | FileCheck -check-prefix CHECK-SCRIPT %s
Modified: lld/trunk/test/ELF/linkerscript/sections-sort.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/sections-sort.s?rev=300120&r1=300119&r2=300120&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/sections-sort.s (original)
+++ lld/trunk/test/ELF/linkerscript/sections-sort.s Wed Apr 12 17:38:02 2017
@@ -1,10 +1,7 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
-# RUN: echo "SECTIONS { \
-# RUN: .text : { *(.text) } \
-# RUN: foo : { *(foo) } \
-# RUN: } " > %t.script
+# RUN: echo "SECTIONS { .text : {*(.text)} foo : {*(foo)}}" > %t.script
# RUN: ld.lld -o %t --script %t.script %t.o -shared
# RUN: llvm-objdump --section-headers %t | FileCheck %s
Modified: lld/trunk/test/ELF/linkerscript/symbol-assignexpr.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/symbol-assignexpr.s?rev=300120&r1=300119&r2=300120&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/symbol-assignexpr.s (original)
+++ lld/trunk/test/ELF/linkerscript/symbol-assignexpr.s Wed Apr 12 17:38:02 2017
@@ -40,9 +40,7 @@
# CHECK-NEXT: 0000000000029000 *ABS* 00000000 symbol11
# CHECK-NEXT: 0000000000001235 *ABS* 00000000 symbol12
-# RUN: echo "SECTIONS { \
-# RUN: symbol2 = symbol; \
-# RUN: }" > %t2.script
+# RUN: echo "SECTIONS { symbol2 = symbol; }" > %t2.script
# RUN: not ld.lld -o %t2 --script %t2.script %t 2>&1 \
# RUN: | FileCheck -check-prefix=ERR %s
# ERR: {{.*}}.script:1: symbol not found: symbol
More information about the llvm-commits
mailing list