This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Clean up platform-specific code in gas/write.c
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: Clean up platform-specific code in gas/write.c
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 21 Aug 2000 08:14:20 -0600
- cc: Geoff Keating <geoffk at cygnus dot com>, binutils at sources dot redhat dot com
- Reply-To: law at cygnus dot com
In message <orpun4hp7s.fsf@guarana.lsd.ic.unicamp.br>you write:
> --=-=-=
>
> On Aug 19, 2000, Geoff Keating <geoffk@cygnus.com> wrote:
>
> >> From: Alexandre Oliva <aoliva@redhat.com>
> >> Date: 19 Aug 2000 14:06:50 -0300
>
> >> Presumably, PC-relative relocations should not be deferred to the
> >> linker, since they may be limited in range.
>
> > This is target-dependent (the 'may be', the 'since', and the 'should
> > not', all different on different platforms).
>
> Yep. How about this patch, then? I figured out how to fix SH to do
> what I wanted without having to tweak anything in the generic tree.
> But, by then, it was too late, and I had already converted all the
> ports I had changed yesterday to use the more flexible and
> better-looking approach of TC_FIX_ADJUSTABLE(fixP) instead of
> TC_DONT_FIX_NON_ADJUSTABLE (which, by itself, is hard to read because
> of the multiple negations).
>
> Also note that TC_FIX_ADJUSTABLE(fixP) is now defined within #ifdefs,
> to match the original code. But maybe I should #define them to 0
> instead of `{obj,tc}_fix_adjustable(fixP)', so that the behavior would
> indeed be identical to the original?
>
> Here's the patch. Ok to install?
>
>
> --=-=-=
> Content-Type: text/x-patch
> Content-Disposition: inline; filename=gas-fix-adjustable.patch
>
> Index: gas/ChangeLog
> from Alexandre Oliva <aoliva@redhat.com>
>
> * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.
> (fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE.
> * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
> <OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define.
> * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
> <OBJ_ELF> (TC_FIX_ADJUSTABLE): Define.
> * config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h:
> Likewise.
This is fine. Please install this patch.
jeff