diff options
| -rw-r--r-- | lld/test/ELF/linkerscript/at.s | 25 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/memory.s | 52 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/numbers.s | 12 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/outsections-addr.s | 22 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/page-size.s | 4 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/sections-sort.s | 5 | ||||
| -rw-r--r-- | lld/test/ELF/linkerscript/symbol-assignexpr.s | 4 | 
7 files changed, 29 insertions, 95 deletions
| diff --git a/lld/test/ELF/linkerscript/at.s b/lld/test/ELF/linkerscript/at.s index 54c8df5815e..26441f1ffd9 100644 --- a/lld/test/ELF/linkerscript/at.s +++ b/lld/test/ELF/linkerscript/at.s @@ -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 diff --git a/lld/test/ELF/linkerscript/memory.s b/lld/test/ELF/linkerscript/memory.s index c21c4b107f3..eb027b7aeb2 100644 --- a/lld/test/ELF/linkerscript/memory.s +++ b/lld/test/ELF/linkerscript/memory.s @@ -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 diff --git a/lld/test/ELF/linkerscript/numbers.s b/lld/test/ELF/linkerscript/numbers.s index 2d97750053a..d4fd13fd819 100644 --- a/lld/test/ELF/linkerscript/numbers.s +++ b/lld/test/ELF/linkerscript/numbers.s @@ -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 diff --git a/lld/test/ELF/linkerscript/outsections-addr.s b/lld/test/ELF/linkerscript/outsections-addr.s index 003b2771c33..fda9bc99434 100644 --- a/lld/test/ELF/linkerscript/outsections-addr.s +++ b/lld/test/ELF/linkerscript/outsections-addr.s @@ -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 diff --git a/lld/test/ELF/linkerscript/page-size.s b/lld/test/ELF/linkerscript/page-size.s index 3d97816a68e..330339d6722 100644 --- a/lld/test/ELF/linkerscript/page-size.s +++ b/lld/test/ELF/linkerscript/page-size.s @@ -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 diff --git a/lld/test/ELF/linkerscript/sections-sort.s b/lld/test/ELF/linkerscript/sections-sort.s index cf1fd3e5782..0e99851910f 100644 --- a/lld/test/ELF/linkerscript/sections-sort.s +++ b/lld/test/ELF/linkerscript/sections-sort.s @@ -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 diff --git a/lld/test/ELF/linkerscript/symbol-assignexpr.s b/lld/test/ELF/linkerscript/symbol-assignexpr.s index 5132ab11d82..14a1f0890ca 100644 --- a/lld/test/ELF/linkerscript/symbol-assignexpr.s +++ b/lld/test/ELF/linkerscript/symbol-assignexpr.s @@ -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 | 

