summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/linkerscript/sections-keep.s
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-09-20 15:08:24 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-09-20 15:08:24 +0000
commit1b87995f3181c1bb84264e3916b85f14c99f060a (patch)
tree16649cf386675bab39fd52c69d13c8b9200d9d2a /lld/test/ELF/linkerscript/sections-keep.s
parent3d9c7638161c69c409dd862f676289cd969b6f11 (diff)
downloadbcm5719-llvm-1b87995f3181c1bb84264e3916b85f14c99f060a.tar.gz
bcm5719-llvm-1b87995f3181c1bb84264e3916b85f14c99f060a.zip
Make tests less dependent on the exact layout.
In most cases that means just not checking the address when we don't need it. For some tests it is easier to just set . to a known value. llvm-svn: 281976
Diffstat (limited to 'lld/test/ELF/linkerscript/sections-keep.s')
-rw-r--r--lld/test/ELF/linkerscript/sections-keep.s50
1 files changed, 25 insertions, 25 deletions
diff --git a/lld/test/ELF/linkerscript/sections-keep.s b/lld/test/ELF/linkerscript/sections-keep.s
index fae6383ca49..c8d69b8a23e 100644
--- a/lld/test/ELF/linkerscript/sections-keep.s
+++ b/lld/test/ELF/linkerscript/sections-keep.s
@@ -10,10 +10,10 @@
# RUN: llvm-objdump -section-headers %t1 | \
# RUN: FileCheck -check-prefix=SECGC %s
# SECGC: Sections:
-# SECGC-NEXT: Idx Name Size Address Type
-# SECGC-NEXT: 0 00000000 0000000000000000
-# SECGC-NEXT: 1 .text 00000007 0000000000000158 TEXT DATA
-# SECGC-NEXT: 2 .temp 00000004 000000000000015f DATA
+# SECGC-NEXT: Idx Name Size
+# SECGC-NEXT: 0 00000000
+# SECGC-NEXT: 1 .text 00000007
+# SECGC-NEXT: 2 .temp 00000004
## Now apply KEEP command to preserve the section.
# RUN: echo "SECTIONS { \
@@ -24,11 +24,11 @@
# RUN: llvm-objdump -section-headers %t1 | \
# RUN: FileCheck -check-prefix=SECNOGC %s
# SECNOGC: Sections:
-# SECNOGC-NEXT: Idx Name Size Address Type
-# SECNOGC-NEXT: 0 00000000 0000000000000000
-# SECNOGC-NEXT: 1 .text 00000007 0000000000000158 TEXT DATA
-# SECNOGC-NEXT: 2 .keep 00000004 000000000000015f DATA
-# SECNOGC-NEXT: 3 .temp 00000004 0000000000000163 DATA
+# SECNOGC-NEXT: Idx Name Size
+# SECNOGC-NEXT: 0 00000000
+# SECNOGC-NEXT: 1 .text 00000007
+# SECNOGC-NEXT: 2 .keep 00000004
+# SECNOGC-NEXT: 3 .temp 00000004
## A section name matches two entries in the SECTIONS directive. The
## first one doesn't have KEEP, the second one does. If section that have
@@ -39,14 +39,14 @@
# RUN: ld.lld --gc-sections -o %t1 --script %t.script %t
# RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix=MIXED1 %s
# MIXED1: Sections:
-# MIXED1-NEXT: Idx Name Size Address Type
-# MIXED1-NEXT: 0 00000000 0000000000000000
-# MIXED1-NEXT: 1 .keep 00000004 0000000000000120 DATA
-# MIXED1-NEXT: 2 .temp 00000004 0000000000000124 DATA
-# MIXED1-NEXT: 3 .text 00000007 0000000000000128 TEXT DATA
-# MIXED1-NEXT: 4 .symtab 00000060 0000000000000000
-# MIXED1-NEXT: 5 .shstrtab 0000002d 0000000000000000
-# MIXED1-NEXT: 6 .strtab 00000012 0000000000000000
+# MIXED1-NEXT: Idx Name Size
+# MIXED1-NEXT: 0 00000000
+# MIXED1-NEXT: 1 .keep 00000004
+# MIXED1-NEXT: 2 .temp 00000004
+# MIXED1-NEXT: 3 .text 00000007
+# MIXED1-NEXT: 4 .symtab 00000060
+# MIXED1-NEXT: 5 .shstrtab 0000002d
+# MIXED1-NEXT: 6 .strtab 00000012
## The same, but now section without KEEP is at first place.
## gold and bfd linkers disagree here. gold collects .keep while
@@ -58,14 +58,14 @@
# RUN: ld.lld --gc-sections -o %t1 --script %t.script %t
# RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix=MIXED2 %s
# MIXED2: Sections:
-# MIXED2-NEXT: Idx Name Size Address Type
-# MIXED2-NEXT: 0 00000000 0000000000000000
-# MIXED2-NEXT: 1 .nokeep 00000004 0000000000000120 DATA
-# MIXED2-NEXT: 2 .temp 00000004 0000000000000124 DATA
-# MIXED2-NEXT: 3 .text 00000007 0000000000000128 TEXT DATA
-# MIXED2-NEXT: 4 .symtab 00000060 0000000000000000
-# MIXED2-NEXT: 5 .shstrtab 0000002f 0000000000000000
-# MIXED2-NEXT: 6 .strtab 00000012 0000000000000000
+# MIXED2-NEXT: Idx Name Size
+# MIXED2-NEXT: 0 00000000
+# MIXED2-NEXT: 1 .nokeep 00000004
+# MIXED2-NEXT: 2 .temp 00000004
+# MIXED2-NEXT: 3 .text 00000007
+# MIXED2-NEXT: 4 .symtab 00000060
+# MIXED2-NEXT: 5 .shstrtab 0000002f
+# MIXED2-NEXT: 6 .strtab 00000012
.global _start
_start:
OpenPOWER on IntegriCloud