* elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
(ppc64_elf_relocate_section): Handle unresolved relocs in opd.
This commit is contained in:
parent
9964235a2b
commit
afbe61cf19
2 changed files with 19 additions and 6 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2002-05-22 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
|
||||||
|
(ppc64_elf_relocate_section): Handle unresolved relocs in opd.
|
||||||
|
|
||||||
2002-05-22 Alan Modra <amodra@bigpond.net.au>
|
2002-05-22 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* elf64-ppc.c (ppc64_elf_relocate_section): Return false for
|
* elf64-ppc.c (ppc64_elf_relocate_section): Return false for
|
||||||
|
|
|
@ -4834,12 +4834,10 @@ ppc64_elf_size_stubs (output_bfd, stub_bfd, info, group_size,
|
||||||
(*htab->layout_sections_again) ();
|
(*htab->layout_sections_again) ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (htab->sbrlt->_raw_size == 0)
|
/* It would be nice to strip .branch_lt from the output if the
|
||||||
{
|
section is empty, but it's too late. If we strip sections here,
|
||||||
_bfd_strip_section_from_output (info, htab->sbrlt);
|
the dynamic symbol table is corrupted since the section symbol
|
||||||
if (htab->srelbrlt != NULL)
|
for the stripped section isn't written. */
|
||||||
_bfd_strip_section_from_output (info, htab->srelbrlt);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
|
||||||
|
@ -5559,6 +5557,16 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||||
relocate = true;
|
relocate = true;
|
||||||
if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
|
if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
|
||||||
{
|
{
|
||||||
|
if (is_opd && h != NULL && info->shared)
|
||||||
|
{
|
||||||
|
/* Lie about opd entries. This case occurs
|
||||||
|
when building shared libraries and we
|
||||||
|
reference a function in another shared
|
||||||
|
lib. In that case we won't use the opd
|
||||||
|
entry in this lib; We ought to edit the
|
||||||
|
opd section to remove unused entries. */
|
||||||
|
unresolved_reloc = false;
|
||||||
|
}
|
||||||
outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
|
outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue