summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-i386/emit-relocs.d8
-rw-r--r--ld/testsuite/ld-i386/emit-relocs.s1
-rw-r--r--ld/testsuite/ld-i386/i386.exp2
4 files changed, 16 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 882fc65cebb..7e533d68ebb 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-28 Richard Sandiford <richard@codesourcery.com>
+
+ * ld-i386/emit-relocs.s, ld-i386/emit-relocs.d: New test.
+ * ld-i386/i386.exp: Run it.
+
2006-02-23 H.J. Lu <hongjiu.lu@intel.com>
* ld-pie/weakundef-data.c: Fix the typo.
diff --git a/ld/testsuite/ld-i386/emit-relocs.d b/ld/testsuite/ld-i386/emit-relocs.d
new file mode 100644
index 00000000000..0c16b94d2e3
--- /dev/null
+++ b/ld/testsuite/ld-i386/emit-relocs.d
@@ -0,0 +1,8 @@
+
+Relocation section '\.rel\.plt' at offset .* contains 1 entries:
+ Offset Info Type Sym\.Value Sym\. Name
+.* .*07 R_386_JUMP_SLOT 00000000 foo
+
+Relocation section '\.rel\.text' at offset .* contains 1 entries:
+ Offset Info Type Sym\.Value Sym\. Name
+.* .*04 R_386_PLT32 00000000 foo
diff --git a/ld/testsuite/ld-i386/emit-relocs.s b/ld/testsuite/ld-i386/emit-relocs.s
new file mode 100644
index 00000000000..e609a2e5750
--- /dev/null
+++ b/ld/testsuite/ld-i386/emit-relocs.s
@@ -0,0 +1 @@
+ call foo@plt
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 4a170cdd10e..f0c0d5249af 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -75,6 +75,8 @@ set i386tests {
{{objdump -drj.text tlsindntpoff.dd}} "tlsindntpoff"}
{"Reloc section order" "-shared -melf_i386 -z nocombreloc" "--32"
{reloc.s} {{objdump -hw reloc.d}} "reloc.so"}
+ {"Basic --emit-relocs support" "-shared -melf_i386 --emit-relocs" "--32"
+ {emit-relocs.s} {{readelf --relocs emit-relocs.d}} "emit-relocs.so"}
{"-z combreloc relocation sections" "-shared -melf_i386 -z combreloc"
"--32" {combreloc.s} {{readelf -r combreloc.d}} "combreloc.so"}
}