summaryrefslogtreecommitdiff
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
commit18cebbead8a279226ffdf9063a1d06f2d564da05 (patch)
tree57251abb061fb62c2c9f36fed39bac4aafc89a8d
parent9eb140eae82e251c6ab9154f4d478153fb8268fb (diff)
downloadbinutils-redhat-18cebbead8a279226ffdf9063a1d06f2d564da05.tar.gz
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
for call-to-undefweak reloc overflow.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-sparc.c13
2 files changed, 17 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3a0bb0af8e..5bd1e341ac 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2006-02-01 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
+ for call-to-undefweak reloc overflow.
+
2006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr>
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c
index 5e8fb2028c..802206fd43 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,