This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: sh-elf: the substraction of two symbols
- To: kkojima at rr dot iij4u dot or dot jp
- Subject: Re: sh-elf: the substraction of two symbols
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Date: Sat, 13 Jan 2001 01:18:41 +0100
- CC: binutils at sources dot redhat dot com
> Date: Fri, 12 Jan 2001 09:50:08 +0900
> From: kaz Kojima <kkojima@rr.iij4u.or.jp>
> Hans-Peter Nilsson <hans-peter.nilsson@axis.com> wrote:
> > You're changing the type of R_SH_REL32 to be partial_inplace
> > (about like it from RELA to REL) with further adjustments to
> > make *that* change work. I think instead you should make gas
> > and the linker set rel->r_offset right for R_SH_REL32 and
> > section symbols.
>
> It seems that almost SH ELF relocations doesn't use addend in
> usual way besides their type is RELA. I think it's intentional.
I believe the current contents of the HOWTO table is
intentional, without there being implications that all
relocations (in particular R_SH_REL32), be partial_inplace from
the fact that most of the other relocations are.
Actually, it seems the rest of the non-relax-related
content-modifying "real" relocations are partial_inplace, the
reason stated in comments being uniformity with the COFF
toolchain.
A comment from Ian, the original author, would be appreciated,
at least on the historical reasons why in sh-elf partial_inplace
is true for all other "real" relocations, and sh-elf still being
RELA.
If the src_mask had been 0xffffffff for R_SH_REL32, the theory
of the partial_inplace unintentionally being false would be more
probable. I believe we shouldn't change the semantics of
R_SH_REL32; we should correct the bugs. If we change the
semantics, old code will need to be re-assembled, so I can't
approve the patch as-is. If semantics are *not* changed despite
the appearance of the patch, a large comment is needed (which I
think it is anyway, to explain why partial_inplace is false for
R_SH_REL32).
> Thank you for your comment.
And thank you for looking into fixing the bug!
brgds, H-P