aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog7
-rw-r--r--ld/testsuite/ld-arm/arm-elf.exp3
-rw-r--r--ld/testsuite/ld-arm/data-only-map.d13
-rw-r--r--ld/testsuite/ld-arm/data-only-map.ld16
-rw-r--r--ld/testsuite/ld-arm/data-only-map.s20
5 files changed, 59 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index b67acb0..0b00887 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-02-12 Daniel Gutson <dgutson@codesourcery.com>
+
+ * ld-arm/arm-elf.exp (armelftests): New test case added.
+ * ld-arm/data-only-map.s: New file.
+ * ld-arm/data-only-map.d: New file.
+ * ld-arm/data-only-map.ld: New file.
+
2010-02-11 David S. Miller <davem@davemloft.net>
* ld-sparc/gotop32.s: Add local symbol case.
diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 9d60084..a207a79 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -241,6 +241,9 @@ set armelftests {
{"Relocation boundaries" "-defsym x=0 -defsym y=0 -defsym _start=0" "" {reloc-boundaries.s}
{{objdump -s reloc-boundaries.d}}
"reloc-boundaries"}
+ {"Data only mapping symbols" "-T data-only-map.ld -Map map" "" {data-only-map.s}
+ {{objdump -dr data-only-map.d}}
+ "data-only-map"}
}
run_ld_link_tests $armelftests
diff --git a/ld/testsuite/ld-arm/data-only-map.d b/ld/testsuite/ld-arm/data-only-map.d
new file mode 100644
index 0000000..39eed87
--- /dev/null
+++ b/ld/testsuite/ld-arm/data-only-map.d
@@ -0,0 +1,13 @@
+
+[^:]*: file format elf32-littlearm
+
+
+Disassembly of section \.text:
+
+00000000 <_start>:
+ 0: eb01 0002 add\.w r0, r1, r2
+ 4: eb010002 \.word 0xeb010002
+ 8: eb01 0002 add\.w r0, r1, r2
+ c: eb01 0200 add\.w r2, r1, r0
+ 10: eb010002 \.word 0xeb010002
+ 14: eb010002 \.word 0xeb010002
diff --git a/ld/testsuite/ld-arm/data-only-map.ld b/ld/testsuite/ld-arm/data-only-map.ld
new file mode 100644
index 0000000..7d6ea92
--- /dev/null
+++ b/ld/testsuite/ld-arm/data-only-map.ld
@@ -0,0 +1,16 @@
+/* Script for ld testsuite */
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+SECTIONS
+{
+ .text :
+ {
+ *(.text)
+ *(.after1)
+ *(.after2)
+ *(.after3)
+ *(.after4)
+ *(.after5)
+ } =0
+}
+
diff --git a/ld/testsuite/ld-arm/data-only-map.s b/ld/testsuite/ld-arm/data-only-map.s
new file mode 100644
index 0000000..0c5e797
--- /dev/null
+++ b/ld/testsuite/ld-arm/data-only-map.s
@@ -0,0 +1,20 @@
+.syntax unified
+.thumb
+.global _start
+_start:
+add.w r0, r1, r2
+
+.section .after1
+.word 0xeb010002
+
+.section .after2
+add.w r0, r1, r2
+
+.section .after3
+add.w r2, r1, r0
+
+.section .after4
+.word 0xeb010002
+
+.section .after5
+.word 0xeb010002