aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2004-12-14 09:48:20 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2004-12-14 09:48:20 +0000
commitc314987d19b8736574973103eca3a3ef1d281d0c (patch)
treec735abc19085fd831e47d29611c50cd3f54d4135 /ld
parent4446463b16642b684e2151f9b316c11ba135b4a6 (diff)
downloadfsf-binutils-gdb-c314987d19b8736574973103eca3a3ef1d281d0c.zip
fsf-binutils-gdb-c314987d19b8736574973103eca3a3ef1d281d0c.tar.gz
fsf-binutils-gdb-c314987d19b8736574973103eca3a3ef1d281d0c.tar.bz2
* elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
overflow for calls to undefined weak symbols.
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-mips-elf/jaloverflow-2.d8
-rw-r--r--ld/testsuite/ld-mips-elf/jaloverflow-2.s7
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp1
4 files changed, 21 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 14a6fa1..cbf50fc 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2004-12-14 Richard Sandiford <rsandifo@redhat.com>
+
+ * ld-mips-elf/jal-overflow-2.[sd]: New test.
+ * ld-mips-elf/mips-elf.exp: Run it.
+
2004-12-13 Richard Sandiford <rsandifo@redhat.com>
* ld-mips-elf/mips-elf.exp: Only run jalbal if n32 is supported.
diff --git a/ld/testsuite/ld-mips-elf/jaloverflow-2.d b/ld/testsuite/ld-mips-elf/jaloverflow-2.d
new file mode 100644
index 0000000..b28b4ed
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/jaloverflow-2.d
@@ -0,0 +1,8 @@
+#name: JAL overflow 2
+#source: jaloverflow-2.s
+#as:
+#ld: -Ttext=0x10000000 -e start
+#objdump: -dr
+#...
+0*10000000: 0c000000.*
+#pass
diff --git a/ld/testsuite/ld-mips-elf/jaloverflow-2.s b/ld/testsuite/ld-mips-elf/jaloverflow-2.s
new file mode 100644
index 0000000..71acf29
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/jaloverflow-2.s
@@ -0,0 +1,7 @@
+# jal relocs against undefined weak symbols should not be treated as
+# overflowing
+
+ .globl start
+ .weak foo
+start:
+ jal foo
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 36e29c5..63fe3f0 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -81,6 +81,7 @@ if {$has_newabi && $linux_gnu} {
}
run_dump_test "jaloverflow"
+run_dump_test "jaloverflow-2"
if {$has_newabi} {
run_dump_test "jalbal"
}