diff options
author | Alan Modra <amodra@bigpond.net.au> | 2001-04-30 13:36:04 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2001-04-30 13:36:04 +0000 |
commit | 3b3f2856c6c02d263b46eb1ec9acf11a96ed6606 (patch) | |
tree | f1273f3fbe0596420caa9d17b95b99abe2413bb0 | |
parent | 62f8d6458a3883761b1f8390d59faa3fbb20ee7d (diff) | |
download | gdb-3b3f2856c6c02d263b46eb1ec9acf11a96ed6606.tar.gz |
* elf32-hppa.c (final_link_relocate): Branch to .+8 for
calls to undefined weak symbols.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf32-hppa.c | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 32c2eaeb9ba..be275cf74d8 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-04-30 Alan Modra <amodra@one.net.au> + + * elf32-hppa.c (final_link_relocate): Branch to .+8 for + calls to undefined weak symbols. + 2001-04-19 Andreas Jaeger <aj@suse.de> * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions. diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 06b60200dcd..fdcb3b4ff7e 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; |