aboutsummaryrefslogtreecommitdiff
path: root/gold/ChangeLog
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-10-09 16:56:33 +1030
committerAlan Modra <amodra@gmail.com>2020-10-09 23:24:17 +1030
commitfa40fbe484954c560ab1c0ff4bc1b2eeb1511344 (patch)
tree2e6af9068d974acf0b43a502398d069bbe23f0ec /gold/ChangeLog
parent4290b0ab2b65db23afc9bd8177885bfd91911c0c (diff)
downloadgdb-fa40fbe484954c560ab1c0ff4bc1b2eeb1511344.zip
gdb-fa40fbe484954c560ab1c0ff4bc1b2eeb1511344.tar.gz
gdb-fa40fbe484954c560ab1c0ff4bc1b2eeb1511344.tar.bz2
[GOLD] Power10 segv due to wild r2
Calling non-pcrel functions from pcrel code requires a stub to set up r2. Gold created the stub, but an "optimisation" made the stub jump to the function local entry, ie. r2 was not initialised. This patch fixes that long branch stub problem, and another that might occur for plt call stubs to local functions. bfd/ * elf64-ppc.c (write_plt_relocs_for_local_syms): Don't do local entry offset optimisation. gold/ * powerpc.cc (Powerpc_relobj::do_relocate_sections): Don't do local entry offset optimisation for lplt_section. (Target_powerpc::Branch_info::make_stub): Don't add local entry offset to long branch dest passed to add_long_branch_entry. Do pass st_other bits. (Stub_table::Branch_stub_ent): Add "other_" field. (Stub_table::add_long_branch_entry): Add "other" param, and save. (Stub_table::branch_stub_size): Adjust long branch offset. (Stub_table::do_write): Likewise. (Target_powerpc::Relocate::relocate): Likewise.
Diffstat (limited to 'gold/ChangeLog')
-rw-r--r--gold/ChangeLog14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 0c00d96..25248a6 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,19 @@
2020-10-09 Alan Modra <amodra@gmail.com>
+ * powerpc.cc (Powerpc_relobj::do_relocate_sections): Don't do
+ local entry offset optimisation for lplt_section.
+ (Target_powerpc::Branch_info::make_stub): Don't add local
+ entry offset to long branch dest passed to
+ add_long_branch_entry. Do pass st_other bits.
+ (Stub_table::Branch_stub_ent): Add "other_" field.
+ (Stub_table::add_long_branch_entry): Add "other" param, and
+ save.
+ (Stub_table::branch_stub_size): Adjust long branch offset.
+ (Stub_table::do_write): Likewise.
+ (Target_powerpc::Relocate::relocate): Likewise.
+
+2020-10-09 Alan Modra <amodra@gmail.com>
+
* powerpc.cc (is_got_reloc): New function.
(Target_powerpc::Relocate::relocate): Use it here, exclude GOT
relocs when looking for stubs.