aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-09-30 03:35:18 +0000
committerAlan Modra <amodra@gmail.com>2002-09-30 03:35:18 +0000
commit302cbfc2102b4a5a97774195302d57c992efb890 (patch)
treefae85c18e458d5f9131d1680fdde45094b89e470 /ld
parentba49312244a0a0dab1f20e539069a72a3448ae50 (diff)
downloadgdb-302cbfc2102b4a5a97774195302d57c992efb890.zip
gdb-302cbfc2102b4a5a97774195302d57c992efb890.tar.gz
gdb-302cbfc2102b4a5a97774195302d57c992efb890.tar.bz2
* ld-i386/reloc.s, ld-i386/reloc.d: New.
* ld-i386/i386.exp: Run new test.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-i386/i386.exp2
-rw-r--r--ld/testsuite/ld-i386/reloc.d18
-rw-r--r--ld/testsuite/ld-i386/reloc.s8
4 files changed, 33 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 7b830dc..eb3ef07 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-30 Alan Modra <amodra@bigpond.net.au>
+
+ * ld-i386/reloc.s, ld-i386/reloc.d: New.
+ * ld-i386/i386.exp: Run new test.
+
2002-09-27 Jakub Jelinek <jakub@redhat.com>
* lib/ld-lib.exp (run_ld_link_tests): Add.
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 4ccb9f6..15821eb 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -52,6 +52,8 @@ set i386tests {
"--32" {tlsnopic1.s tlsnopic2.s}
{{readelf -Ssrl tlsnopic.rd} {objdump -drj.text tlsnopic.dd}
{objdump -sj.got tlsnopic.sd}} "libtlsnopic.so"}
+ {"Reloc section order" "-shared -melf_i386" "--32" {reloc.s}
+ {{objdump -hw reloc.d}} "reloc.so"}
}
run_ld_link_tests $i386tests
diff --git a/ld/testsuite/ld-i386/reloc.d b/ld/testsuite/ld-i386/reloc.d
new file mode 100644
index 0000000..2981110
--- /dev/null
+++ b/ld/testsuite/ld-i386/reloc.d
@@ -0,0 +1,18 @@
+# Test that orphan reloc sections are placed before .rel.plt even when
+# .rel.plt is the only reloc section.
+#source: reloc.s
+#as: --32
+#ld: -shared -melf_i386
+#objdump: -hw
+#target: i?86-*-*
+
+.*: +file format elf32-i386
+#...
+.*\.relplatypus.*
+#...
+.*\.rel\.plt.*
+# x86 ld doesn't output non-alloc reloc sections to shared libs, so disable
+# the following two lines for the time being.
+# #...
+# .*\.relechidna.*
+#pass
diff --git a/ld/testsuite/ld-i386/reloc.s b/ld/testsuite/ld-i386/reloc.s
new file mode 100644
index 0000000..0e3ff1d
--- /dev/null
+++ b/ld/testsuite/ld-i386/reloc.s
@@ -0,0 +1,8 @@
+ .section echidna
+ .long .text
+
+ .section platypus,"ax"
+ .long .text
+
+ .text
+ jmp _start@plt