summaryrefslogtreecommitdiff
path: root/bfd/elfxx-sparc.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2006-02-01 22:03:38 +0000
committerEric Botcazou <ebotcazou@libertysurf.fr>2006-02-01 22:03:38 +0000
commit4de044622a59429c389dd13046890ecd83513aa0 (patch)
treebdabb38103df14af31f0db421d4c12868f52df9c /bfd/elfxx-sparc.c
parent8cf2e5f0ab430880c0e9b873cee80e835da4762f (diff)
downloadgdb-4de044622a59429c389dd13046890ecd83513aa0.tar.gz
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
for call-to-undefweak reloc overflow.
Diffstat (limited to 'bfd/elfxx-sparc.c')
-rw-r--r--bfd/elfxx-sparc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 5e8fb2028c5..802206fd434 100644
--- a/bfd/elfxx-sparc.c
+++ b/bfd/elfxx-sparc.c
@@ -3373,7 +3373,18 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
break;
if (h != NULL)
- name = NULL;
+ {
+ /* Assume this is a call protected by other code that
+ detect the symbol is undefined. If this is the case,
+ we can safely ignore the overflow. If not, the
+ program is hosed anyway, and a little warning isn't
+ going to help. */
+ if (h->root.type == bfd_link_hash_undefweak
+ && howto->pc_relative)
+ break;
+
+ name = NULL;
+ }
else
{
name = bfd_elf_string_from_elf_section (input_bfd,