* elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
rebuild sym name when reporting errors.
This commit is contained in:
parent
5502cb9fb4
commit
cd27b2768b
@ -1,3 +1,8 @@
|
|||||||
|
2003-02-18 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
|
||||||
|
rebuild sym name when reporting errors.
|
||||||
|
|
||||||
2003-02-17 Nick Clifton <nickc@redhat.com>
|
2003-02-17 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* elflink.h (elf_link_output_extsym): Only check
|
* elflink.h (elf_link_output_extsym): Only check
|
||||||
|
@ -7011,7 +7011,6 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
|
|
||||||
r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
|
r_type = (enum elf_ppc64_reloc_type) ELF64_R_TYPE (rel->r_info);
|
||||||
r_symndx = ELF64_R_SYM (rel->r_info);
|
r_symndx = ELF64_R_SYM (rel->r_info);
|
||||||
r = bfd_reloc_other;
|
|
||||||
sym = (Elf_Internal_Sym *) 0;
|
sym = (Elf_Internal_Sym *) 0;
|
||||||
sec = (asection *) 0;
|
sec = (asection *) 0;
|
||||||
h = (struct elf_link_hash_entry *) 0;
|
h = (struct elf_link_hash_entry *) 0;
|
||||||
@ -8105,11 +8104,14 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
|
|
||||||
if (r != bfd_reloc_ok)
|
if (r != bfd_reloc_ok)
|
||||||
{
|
{
|
||||||
const char *name;
|
if (sym_name == NULL)
|
||||||
|
sym_name = "(null)";
|
||||||
if (h != NULL)
|
if (r == bfd_reloc_overflow)
|
||||||
{
|
{
|
||||||
if (h->root.type == bfd_link_hash_undefweak
|
if (warned)
|
||||||
|
continue;
|
||||||
|
if (h != NULL
|
||||||
|
&& h->root.type == bfd_link_hash_undefweak
|
||||||
&& ppc64_elf_howto_table[(int) r_type]->pc_relative)
|
&& ppc64_elf_howto_table[(int) r_type]->pc_relative)
|
||||||
{
|
{
|
||||||
/* Assume this is a call protected by other code that
|
/* Assume this is a call protected by other code that
|
||||||
@ -8121,21 +8123,8 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = h->root.root.string;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
name = bfd_elf_local_sym_name (input_bfd, sym);
|
|
||||||
if (name == NULL)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (r == bfd_reloc_overflow)
|
|
||||||
{
|
|
||||||
if (warned)
|
|
||||||
continue;
|
|
||||||
if (!((*info->callbacks->reloc_overflow)
|
if (!((*info->callbacks->reloc_overflow)
|
||||||
(info, name, ppc64_elf_howto_table[(int) r_type]->name,
|
(info, sym_name, ppc64_elf_howto_table[(int) r_type]->name,
|
||||||
rel->r_addend, input_bfd, input_section, rel->r_offset)))
|
rel->r_addend, input_bfd, input_section, rel->r_offset)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -8145,7 +8134,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
|||||||
(_("%s(%s+0x%lx): reloc against `%s': error %d"),
|
(_("%s(%s+0x%lx): reloc against `%s': error %d"),
|
||||||
bfd_archive_filename (input_bfd),
|
bfd_archive_filename (input_bfd),
|
||||||
bfd_get_section_name (input_bfd, input_section),
|
bfd_get_section_name (input_bfd, input_section),
|
||||||
(long) rel->r_offset, name, (int) r);
|
(long) rel->r_offset, sym_name, (int) r);
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user