* ld-i386/reloc.s, ld-i386/reloc.d: New.
authorAlan Modra <amodra@gmail.com>
Mon, 30 Sep 2002 03:35:18 +0000 (03:35 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 30 Sep 2002 03:35:18 +0000 (03:35 +0000)
* ld-i386/i386.exp: Run new test.

ld/testsuite/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/reloc.d [new file with mode: 0644]
ld/testsuite/ld-i386/reloc.s [new file with mode: 0644]

index 7b830dc44edc2957ee34c1f1efc8d087a1446665..eb3ef072ea8eaf3ed0c00145c9fc5af3aa24ae5b 100644 (file)
@@ -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.
index 4ccb9f6c63dd2777203e92012887831721e7a0ea..15821ebdbfee6652e7494d1b44755918c3ad52f5 100644 (file)
@@ -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 (file)
index 0000000..2981110
--- /dev/null
@@ -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 (file)
index 0000000..0e3ff1d
--- /dev/null
@@ -0,0 +1,8 @@
+ .section echidna
+ .long .text
+
+ .section platypus,"ax"
+ .long .text
+
+ .text
+ jmp _start@plt