aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-hppa.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-04-30 13:34:41 +0000
committerAlan Modra <amodra@gmail.com>2001-04-30 13:34:41 +0000
commitdb20fd76547e0c6e7f73969bbeec15e3d83a182e (patch)
tree78e83adb3d236305fc66ba837152c6b12f1434fe /bfd/elf32-hppa.c
parentd5166ae11e7cfb49047d2df5443306e007f820a1 (diff)
downloadgdb-db20fd76547e0c6e7f73969bbeec15e3d83a182e.zip
gdb-db20fd76547e0c6e7f73969bbeec15e3d83a182e.tar.gz
gdb-db20fd76547e0c6e7f73969bbeec15e3d83a182e.tar.bz2
* elf32-hppa.c (final_link_relocate): Branch to .+8 for
calls to undefined weak symbols.
Diffstat (limited to 'bfd/elf32-hppa.c')
-rw-r--r--bfd/elf32-hppa.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 06b6020..fdcb3b4 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -3271,10 +3271,13 @@ final_link_relocate (input_section, contents, rel, value, hplink, sym_sec, h)
else if (sym_sec == NULL && h != NULL
&& h->elf.root.type == bfd_link_hash_undefweak)
{
- /* It's OK if undefined weak. Make undefined weak
- branches go nowhere. */
+ /* It's OK if undefined weak. Calls to undefined weak
+ symbols behave as if the "called" function
+ immediately returns. We can thus call to a weak
+ function without first checking whether the function
+ is defined. */
value = location;
- addend = 0;
+ addend = 8;
}
else
return bfd_reloc_notsupported;