From: Ulrich Drepper Date: Sun, 13 Jun 1999 06:39:21 +0000 (+0000) Subject: (tc_gen_reloc): Fix handling of GOTPC relocs. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a8aed0fb2dc66cca8bd7e1c3d22dcf5a02f677ca;p=binutils-gdb.git (tc_gen_reloc): Fix handling of GOTPC relocs. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 857028185e3..cbcb93d7fd1 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +1999-06-12 Philip Blundell + + * config/tc-arm.c (tc_gen_reloc): Fix handling of GOTPC relocs. + 1999-06-13 Ian Lance Taylor * write.c (adjust_reloc_syms): Rather than never reducing reloc diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index fa84ca03dd7..eb39c78d0dd 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -5713,7 +5713,10 @@ tc_gen_reloc (section, fixp) if (code == BFD_RELOC_32_PCREL && GOT_symbol && fixp->fx_addsy == GOT_symbol) - code = BFD_RELOC_ARM_GOTPC; + { + code = BFD_RELOC_ARM_GOTPC; + reloc->addend = fixp->fx_offset = reloc->address; + } #endif reloc->howto = bfd_reloc_type_lookup (stdoutput, code);