summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript
diff options
context:
space:
mode:
Diffstat (limited to 'lld/test/ELF/linkerscript')
-rw-r--r--lld/test/ELF/linkerscript/non-alloc.s9
-rw-r--r--lld/test/ELF/linkerscript/sections.s15
2 files changed, 12 insertions, 12 deletions
diff --git a/lld/test/ELF/linkerscript/non-alloc.s b/lld/test/ELF/linkerscript/non-alloc.s
index b830c74ea21..0ad1a7470aa 100644
--- a/lld/test/ELF/linkerscript/non-alloc.s
+++ b/lld/test/ELF/linkerscript/non-alloc.s
@@ -1,13 +1,12 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
-# RUN: echo "SECTIONS { .foo : {*(foo)} }" > %t.script
+# RUN: echo "SECTIONS { .foo 0 : {*(foo)} }" > %t.script
# RUN: ld.lld -o %t1 --script %t.script %t -shared
# RUN: llvm-readobj -elf-output-style=GNU -s -l %t1 | FileCheck %s
-# Test that we create all necessary PT_LOAD. It is a harmless oddity that
-# foo ends in a PT_LOAD. We use to stop at the first non-alloc, causing
-# us to not create PT_LOAD for linker generated sections.
+# Test that we create all necessary PT_LOAD. We use to stop at the first
+# non-alloc, causing us to not create PT_LOAD for linker generated sections.
# CHECK: Program Headers:
# CHECK-NEXT: Type
@@ -19,7 +18,7 @@
# CHECK: Section to Segment mapping:
# CHECK-NEXT: Segment Sections...
# CHECK-NEXT: 00
-# CHECK-NEXT: 01 .foo .dynsym .hash .dynstr
+# CHECK-NEXT: 01 .dynsym .hash .dynstr
# CHECK-NEXT: 02 .text
# CHECK-NEXT: 03 .dynamic
diff --git a/lld/test/ELF/linkerscript/sections.s b/lld/test/ELF/linkerscript/sections.s
index b68dac765a7..d899cf8333a 100644
--- a/lld/test/ELF/linkerscript/sections.s
+++ b/lld/test/ELF/linkerscript/sections.s
@@ -25,7 +25,8 @@
# SEC-DEFAULT: 7 .shstrtab 00000032 {{[0-9a-f]*}}
# SEC-DEFAULT: 8 .strtab 00000008 {{[0-9a-f]*}}
-# Sections are put in order specified in linker script.
+# Sections are put in order specified in linker script, other than alloc
+# sections going first.
# RUN: echo "SECTIONS { \
# RUN: .bss : { *(.bss) } \
# RUN: other : { *(other) } \
@@ -41,12 +42,12 @@
# Idx Name Size
# SEC-ORDER: 1 .bss 00000002 {{[0-9a-f]*}} BSS
# SEC-ORDER: 2 other 00000003 {{[0-9a-f]*}} DATA
-# SEC-ORDER: 3 .shstrtab 00000002 {{[0-9a-f]*}}
-# SEC-ORDER: 4 .shstrtab 00000032 {{[0-9a-f]*}}
-# SEC-ORDER: 5 .symtab 00000030 {{[0-9a-f]*}}
-# SEC-ORDER: 6 .strtab 00000008 {{[0-9a-f]*}}
-# SEC-ORDER: 7 .data 00000020 {{[0-9a-f]*}} DATA
-# SEC-ORDER: 8 .text 0000000e {{[0-9a-f]*}} TEXT DATA
+# SEC-ORDER: 3 .data 00000020 {{[0-9a-f]*}} DATA
+# SEC-ORDER: 4 .text 0000000e {{[0-9a-f]*}} TEXT DATA
+# SEC-ORDER: 5 .shstrtab 00000002 {{[0-9a-f]*}}
+# SEC-ORDER: 6 .shstrtab 00000032 {{[0-9a-f]*}}
+# SEC-ORDER: 7 .symtab 00000030 {{[0-9a-f]*}}
+# SEC-ORDER: 8 .strtab 00000008 {{[0-9a-f]*}}
# .text and .data have swapped names but proper sizes and types.
# RUN: echo "SECTIONS { \
OpenPOWER on IntegriCloud