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:

>> -  mirela.r_type2 = ELF64_MIPS_R_TYPE2 (src[1].r_info);
>> +  mirela.r_type2 = ELF64_MIPS_R_TYPE (src[1].r_info);
>>    mirela.r_ssym = ELF64_MIPS_R_SSYM (src[1].r_info);
>> -  mirela.r_type3 = ELF64_MIPS_R_TYPE3 (src[2].r_info);
>> +  mirela.r_type3 = ELF64_MIPS_R_TYPE (src[2].r_info);

> I don't see how _removing_ the TYPE2/TYPE3 handling can improve things.

When the triple-relocation encoded in a single r_info is split into a
sequence of 3 separate relocations, each r_info of the sequence will
have the relocation number in R_TYPE, instead of being encoded in the
separate bits that are loaded by R_TYPE[23].

>> -	 false,			/* partial_inplace */
>> +	 true,			/* partial_inplace */

> It is surely wrong to do partial_inplace with RELA relocations.

There's nothing wrong about it.  It's just that it misses part of the
benefit of using RELA relocations, which is to not be limited by the
size of the field to store the addend.  Unfortunately, IRIX native
tools do use partial in-place relocations (and I suspect they're
actually REL, not RELA), 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.  I don't even understand why we're doing this with RELA.
To me, that's already a divergence from the behavior of the native
tools.

-- 
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]