aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ppc.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>1999-06-04 13:25:23 +0000
committerRichard Henderson <rth@redhat.com>1999-06-04 13:25:23 +0000
commitdc1bc0c9a560b4d1d69836fc7e4068c90249291b (patch)
treecaf3b1181fe085983c043177fb1356f95ffdd351 /bfd/elf32-ppc.c
parent79e5982fedce17e8d61581892353d486bcc3c25f (diff)
downloadgdb-dc1bc0c9a560b4d1d69836fc7e4068c90249291b.zip
gdb-dc1bc0c9a560b4d1d69836fc7e4068c90249291b.tar.gz
gdb-dc1bc0c9a560b4d1d69836fc7e4068c90249291b.tar.bz2
Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of range undefweak symbols. * hash.c: Add missing comma after @xref{} * linker.c: Likewise.
Diffstat (limited to 'bfd/elf32-ppc.c')
-rw-r--r--bfd/elf32-ppc.c71
1 files changed, 38 insertions, 33 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 25bb24a..b84b863 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3751,47 +3751,52 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation,
addend);
- if (r != bfd_reloc_ok)
+ if (r == bfd_reloc_ok)
+ ;
+ else if (r == bfd_reloc_overflow)
{
- ret = false;
- switch (r)
+ const char *name;
+
+ if (h != NULL)
{
- default:
- break;
+ if (h->root.type == bfd_link_hash_undefweak
+ && howto->pc_relative)
+ {
+ /* 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. */
- case bfd_reloc_overflow:
- {
- const char *name;
-
- if (h != NULL)
- name = h->root.root.string;
- else
- {
- name = bfd_elf_string_from_elf_section (input_bfd,
- symtab_hdr->sh_link,
- sym->st_name);
- if (name == NULL)
- break;
-
- if (*name == '\0')
- name = bfd_section_name (input_bfd, sec);
- }
-
- (*info->callbacks->reloc_overflow)(info,
- name,
- howto->name,
- (bfd_vma) 0,
- input_bfd,
- input_section,
- offset);
- }
- break;
+ continue;
+ }
+ name = h->root.root.string;
+ }
+ else
+ {
+ name = bfd_elf_string_from_elf_section (input_bfd,
+ symtab_hdr->sh_link,
+ sym->st_name);
+ if (name == NULL)
+ continue;
+ if (*name == '\0')
+ name = bfd_section_name (input_bfd, sec);
}
+
+ (*info->callbacks->reloc_overflow)(info,
+ name,
+ howto->name,
+ (bfd_vma) 0,
+ input_bfd,
+ input_section,
+ offset);
+ ret = false;
}
+ else
+ ret = false;
}
-
#ifdef DEBUG
fprintf (stderr, "\n");
#endif