PowerPC64 debian bug 886264, out-of-line save/restore functions
authorAlan Modra <amodra@gmail.com>
Wed, 14 Mar 2018 11:39:33 +0000 (22:09 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 14 Mar 2018 11:50:11 +0000 (22:20 +1030)
commit7dda8d3cf3b089bb7e03c4cdbec827fc6a188c88
treebb8a493a0728547a8f7707933106dca3f1c3debb
parent9e223787a474c672c5f1cfd4574857241ae4eafa
PowerPC64 debian bug 886264, out-of-line save/restore functions

This calculation in relocate_section

      if (stub_entry->stub_type == ppc_stub_save_res)
relocation += (stub_sec->output_offset
       + stub_sec->output_section->vma
       + stub_sec->size - htab->sfpr->size
       - htab->sfpr->output_offset
       - htab->sfpr->output_section->vma);

to adjust from the original out-of-line save/restore function address
in sfpr to a copy at the end of stub_sec goes wrong when stub_sec is
padded, because the copy is no longer at the end of stub_sec.  The
solution is to pad before copying sfpr, so the copy is always at the
end of stub_sec.

* elf64-ppc.c (sfpr_define): Adjust for stub_sec size having
sfpr size added before defining alias symbols.
(ppc64_elf_build_stubs): Add stub section padding before
copying sfpr contents and defining save/restore alias symbols.
bfd/ChangeLog
bfd/elf64-ppc.c
This page took 0.028229 seconds and 4 git commands to generate.