This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [RFA:] Handle merge-sections in fixup_segment (Re: Various SHfixes)
- To: binutils at sources dot redhat dot com
- Subject: Re: [RFA:] Handle merge-sections in fixup_segment (Re: Various SHfixes)
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Date: Mon, 15 Oct 2001 14:20:00 +0900
- References: <Pine.BSF.4.30.0110142053330.79347-100000@dair.pair.com>
Hans-Peter Nilsson <hp@bitrange.com> wrote:
>> 2001-09-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
>>
>> * config/tc-sh.c (md_apply_fix): Adjust back VAL for a symbol in
>> a merge section.
>
> There's a bug allright, though I don't think that's the right
> place to fix it.
>
> I would have fixed it by letting TC_FIX_ADJUSTABLE return zero
> for it, but that would imply that it's up to each *port* to do
> the same thing. Though it seems it only makes a difference for
> ports with the "kitten-eating wrong" (RTH's judgement :-) RELA
> with partial-inplace.
>
> When reading the SEC_MERGE patches, it seems it was supposed to
> be the generic bits of gas that should handle it: to treat
> relocations for SEC_MERGE section in a matter similar to
> external references, so the linker can do whatever it likes with
> the section contents. Therefore, there should be no resolved
> addend for the fx_addsy, just as if TC_FIX_ADJUSTABLE had
> returned 1 or the symbol had been undefined at assembly-time.
> I'm deliberately not looking into handling subtracted symbols,
> I'm just leaving that as is.
Thanks for your review and explanation. I'm waiting for your
patch to be committed.
kaz