This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] MIPS bfd: abi 64 ld -r


On Sep  3, 2002, Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de> wrote:

> It's wrong to say all RELA relocations will use partial_inplace
> (especially if none of them do, AFAIK).

So, did you test it on IRIX?  I did, and I found that not only did the
IRIX assembler place the addends in place, but also the linker not
surprisingly picked them up from there, unlike our linker, that
insisted on ignoring the in-place addend.  Unfortunately, I can't find
the exact testcase I was using at that time, but I wouldn't be
surprised if it was the same `main(){}' testcase that has exposed
other problems fixed in this patch Stan posted.

> If you are talking about R_MIPS_HI16 and R_MIPS_LO16, the IRIX tools
> actually use REL relocations for them. That's why the backend has
> also REL support.

I don't think those are the ones I'm talking about.  The very fact
that I had to tweak one of the RELA relocations to fix the problem
speaks for itself.  Whether I went too far in my generalization is
fair to question, but not the fact that, for at least one of the RELA
relocations, the IRIX tools use in-place addends.

>> so doing partial in-place too is not a matter of taste, it's a
>> matter of binary compatibility.  We don't have a choice.

> We have, because the IRIX tools accept their RELA variants, too.

I never disputed this.  They just happen to accept RELA with
the addend in place.  This is perfectly valid, even if somewhat
nonsensical for disabling one of the major benefits of RELA over REL.
But such is life.

> The MIPS/SGI n64 ABI Draft deprecates REL in favour of RELA, SGI
> doesn't adhere to this fully.

Which is probably the reason why they handle RELA with
partial_inplace, so that they didn't have to code the applies
relocations and extracts addends twice.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]