aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2016-02-02 23:16:14 +1030
committerAlan Modra <amodra@gmail.com>2016-02-02 23:59:03 +1030
commit85fabe715c441e1c90fe913e2a6d65f0e487e5e8 (patch)
tree94d95813560fad196302893d5f1f47ea54352fa1 /gold
parent14f2c699ddca1e2f706342dffc59a6c7e23e844c (diff)
downloadgdb-85fabe715c441e1c90fe913e2a6d65f0e487e5e8.zip
gdb-85fabe715c441e1c90fe913e2a6d65f0e487e5e8.tar.gz
gdb-85fabe715c441e1c90fe913e2a6d65f0e487e5e8.tar.bz2
PowerPC64 ELFv2 entry code
This tightens the condition under which ld optimizes PIC entry code to non-PIC. bfd/ * elf64-ppc.c (ppc64_elf_relocate_section): Further restrict ELFv2 entry optimization. gold/ * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog4
-rw-r--r--gold/powerpc.cc1
2 files changed, 5 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 06cafb0..c0b7e56 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,7 @@
+2016-02-02 Alan Modra <amodra@gmail.com>
+
+ * powerpc.cc (relocate): Further restrict ELFv2 entry optimization.
+
2016-01-15 Han Shen <shenhan@google.com>
PR gold/19472 - need pc-relative stubs.
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index e26a198..6df2904 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -7727,6 +7727,7 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
&& preloc != NULL
&& target->abiversion() >= 2
&& !parameters->options().output_is_position_independent()
+ && rela.get_r_addend() == 4
&& gsym != NULL
&& strcmp(gsym->name(), ".TOC.") == 0)
{