PPC gold doesn't check for overflow properly
authorAlan Modra <amodra@gmail.com>
Thu, 20 Nov 2014 08:31:23 +0000 (19:01 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 20 Nov 2014 11:08:27 +0000 (21:38 +1030)
commiteab942c64fca084366c2a37a44121966ad225e1d
tree5caac28a8b1af78bb7db6baf3fc46a6afef4c3b7
parent711833262c7a413b10a32f01153454bc5a53a5a6
PPC gold doesn't check for overflow properly

Corrects overflow test for rel14, addr14, rel24, addr24 branch relocs,
and prints an information message to give a hint as to how a branch
that can't reach a stub might be cured.

bfd/
* elf64-ppc.c (group_sections): Init stub14_group_size from
--stub-group-size parameter divided by 1024.
gold/
* powerpc.cc (Stub_control::Stub_control): Init stub14_group_size_
from --stub-group-size parameter divided by 1024.
(Powerpc_relocate_functions::rela, rela_ua): Add fieldsize
template parameter.  Update all uses.
(Target_powerpc::Relocate::relocate): Rename has_plt_value to
has_stub_value.  Set for long branches.  Don't report overflow for
branch to undefined weak symbols.  Print info message on
overflowing branch to stub.
bfd/ChangeLog
bfd/elf64-ppc.c
gold/ChangeLog
gold/powerpc.cc