aboutsummaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-08-18 12:43:46 +0930
committerAlan Modra <amodra@gmail.com>2021-08-18 13:36:57 +0930
commit89c905a342d2cb35ebc4d66ad7cdca581b5134c3 (patch)
treeeb7c8ce28ea83575ff8cfb595b4110f52d7fde98 /gold
parenta3e8dd2ad3bce85d550b131cb12b5250ac830faa (diff)
downloadfsf-binutils-gdb-89c905a342d2cb35ebc4d66ad7cdca581b5134c3.zip
fsf-binutils-gdb-89c905a342d2cb35ebc4d66ad7cdca581b5134c3.tar.gz
fsf-binutils-gdb-89c905a342d2cb35ebc4d66ad7cdca581b5134c3.tar.bz2
[GOLD] PowerPC64 relocation overflow for -Os register save/restore funcs
Fixes a silly mistake in calculating the address of -Os out-of-line register save/restore function copies. Copies of these linker defined functions are added to stub sections when the original (in target->savres_section) can't be reached. * powerpc.cc (Target_powerpc::Relocate::relocate): Correct address calculation of out-of-line save/restore function copies.
Diffstat (limited to 'gold')
-rw-r--r--gold/powerpc.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 6b12ed8..11b9869 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -11201,6 +11201,8 @@ Target_powerpc<size, big_endian>::Relocate::relocate(
{
if (ent->save_res_)
value = (value - target->savres_section()->address()
+ + stub_table->stub_address()
+ + stub_table->plt_size()
+ stub_table->branch_size());
else
{