From 77fa4d98a80a87ae11ab99852efd3807b034c2fa Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Wed, 29 Nov 1995 18:17:24 +0000 Subject: [PATCH] Fix -mrelocatable --- gas/ChangeLog | 6 ++++++ gas/config/tc-ppc.c | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 1070a2578c..77d314d7ef 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +Wed Nov 29 13:00:20 1995 Michael Meissner + + * config/tc-ppc.c (md_apply_fix3): Don't adjust the value for 32 + bit relocs converted to PC relative relocs. This turned out to + add the offset from the beginning of .text twice. + Tue Nov 28 10:42:36 1995 Ken Raeburn * stabs.c (s_stab_generic): In 's' case, free string from diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 3b66929500..f6ec614a46 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -4184,10 +4184,8 @@ md_apply_fix3 (fixp, valuep, seg) case BFD_RELOC_32: case BFD_RELOC_CTOR: if (fixp->fx_pcrel) - { - fixp->fx_r_type = BFD_RELOC_32_PCREL; - value += fixp->fx_frag->fr_address + fixp->fx_where; - } /* fall through */ + fixp->fx_r_type = BFD_RELOC_32_PCREL; + /* fall through */ case BFD_RELOC_RVA: case BFD_RELOC_32_PCREL: -- 2.34.1