summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-11-20 19:01:23 +1030
committerAlan Modra <amodra@gmail.com>2014-11-20 21:38:27 +1030
commiteab942c64fca084366c2a37a44121966ad225e1d (patch)
tree5caac28a8b1af78bb7db6baf3fc46a6afef4c3b7 /bfd
parent711833262c7a413b10a32f01153454bc5a53a5a6 (diff)
downloadbinutils-eab942c64fca084366c2a37a44121966ad225e1d.tar.gz
binutils-eab942c64fca084366c2a37a44121966ad225e1d.tar.bz2
binutils-eab942c64fca084366c2a37a44121966ad225e1d.zip
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-ppc.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index bbfb46c1c39..d1024057064 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2014-11-20 Alan Modra <amodra@gmail.com>
+ * elf64-ppc.c (group_sections): Init stub14_group_size from
+ --stub-group-size parameter divided by 1024.
+
+2014-11-20 Alan Modra <amodra@gmail.com>
+
* elf32-ppc.c (ppc_elf_relax_section): Correct ppc476 workaround
alignment calculation.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 901a88d9232..0245a2c72e1 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11805,7 +11805,7 @@ group_sections (struct ppc_link_hash_table *htab,
bfd_boolean suppress_size_errors;
suppress_size_errors = FALSE;
- stub14_group_size = stub_group_size;
+ stub14_group_size = stub_group_size >> 10;
if (stub_group_size == 1)
{
/* Default values. */