aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorJie Zhang <jie.zhang@analog.com>2010-02-27 12:34:25 +0000
committerJie Zhang <jie.zhang@analog.com>2010-02-27 12:34:25 +0000
commit3cff7cc71fc25ffa83e7d5ce8f4aeb308fb656db (patch)
tree9fa0a8f6e1ec56367ae6b180392f4d69520074c8 /ld/testsuite
parenteb1956643ddbb298d1005c939d3b9fce04980a4a (diff)
downloadgdb-3cff7cc71fc25ffa83e7d5ce8f4aeb308fb656db.zip
gdb-3cff7cc71fc25ffa83e7d5ce8f4aeb308fb656db.tar.gz
gdb-3cff7cc71fc25ffa83e7d5ce8f4aeb308fb656db.tar.bz2
* scripttempl/armbpabi.sc: Don't combine .init_array.* or
.fini_array.* when do relocatable linking. * scripttempl/elf.sc: Likewise. * scripttempl/elf32sh-symbian.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. testsuite/ * ld-elf/init-fini-arrays.s: New test. * ld-elf/init-fini-arrays.d: New test.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-elf/init-fini-arrays.d9
-rw-r--r--ld/testsuite/ld-elf/init-fini-arrays.s6
3 files changed, 20 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 940685d..8876401 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2010-02-27 Jie Zhang <jie@codesourcery.com>
+
+ * ld-elf/init-fini-arrays.s: New test.
+ * ld-elf/init-fini-arrays.d: New test.
+
2010-02-24 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
* ld-arm/group-relocs.s: Mark code sections as executable.
diff --git a/ld/testsuite/ld-elf/init-fini-arrays.d b/ld/testsuite/ld-elf/init-fini-arrays.d
new file mode 100644
index 0000000..1ffd707
--- /dev/null
+++ b/ld/testsuite/ld-elf/init-fini-arrays.d
@@ -0,0 +1,9 @@
+#source: init-fini-arrays.s
+#ld: -r
+#readelf: -S
+
+#...
+ \[[ 0-9]+\] \.init_array\.01000[ \t]+PROGBITS[ \t0-9a-f]+WA?.*
+#...
+ \[[ 0-9]+\] \.fini_array\.01000[ \t]+PROGBITS[ \t0-9a-f]+WA?.*
+#pass
diff --git a/ld/testsuite/ld-elf/init-fini-arrays.s b/ld/testsuite/ld-elf/init-fini-arrays.s
new file mode 100644
index 0000000..8f7a3f7
--- /dev/null
+++ b/ld/testsuite/ld-elf/init-fini-arrays.s
@@ -0,0 +1,6 @@
+ .section .init_array.01000,"aw",%progbits
+ .align 4
+ .word 0
+ .section .fini_array.01000,"aw",%progbits
+ .align 4
+ .word 0