aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-arm.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-06-13 06:39:21 +0000
committerUlrich Drepper <drepper@redhat.com>1999-06-13 06:39:21 +0000
commita8aed0fb2dc66cca8bd7e1c3d22dcf5a02f677ca (patch)
tree9795ab7893946222005d08e00e458c3374b2ccf9 /gas/config/tc-arm.c
parent6b5bd373fb9597e34530f097bc1f35c375a2a12b (diff)
downloadgdb-a8aed0fb2dc66cca8bd7e1c3d22dcf5a02f677ca.zip
gdb-a8aed0fb2dc66cca8bd7e1c3d22dcf5a02f677ca.tar.gz
gdb-a8aed0fb2dc66cca8bd7e1c3d22dcf5a02f677ca.tar.bz2
(tc_gen_reloc): Fix handling of GOTPC relocs.
Diffstat (limited to 'gas/config/tc-arm.c')
-rw-r--r--gas/config/tc-arm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index fa84ca0..eb39c78 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);