FYI: patches for powerpc-aix...
Tristan Gingold
gingold@adacore.com
Thu May 16 13:11:00 GMT 2013
On May 16, 2013, at 2:52 PM, Richard Sandiford wrote:
> Tristan Gingold <gingold@adacore.com> writes:
>> On May 16, 2013, at 1:59 AM, Alan Modra wrote:
>>
>>> On Wed, May 15, 2013 at 04:38:10PM +0200, Tristan Gingold wrote:
>>>> bfd/
>>>> 2013-05-15 Tristan Gingold <gingold@adacore.com>
>>>>
>>>> * coff-rs6000.c (xcoff_howto_table): Add R_POS_16 entry.
>>>
>>> I'm a little curious as to why you didn't use the R_RL howto, which
>>> only differs from this one in the type and name. The type won't be
>>> used to set up an external reloc, will it? (And if we do get an
>>> external reloc, the only info I have on R_RL says "treated the same as
>>> the R_POS relocation type".)
>
> Yeah, which makes the R_RL and R_RLA entries look a bit odd.
> The R_POS howto entry is (rightly) a full address field,
> whereas R_RL and R_RLA have masks of just 0xffff.
>
>>> Also, doesn't coff64-rs6000.c need an equivalent patch?
>>
>> So ok for this change ?
>
> Sorry for playing catch-up, but I think we should try to avoid a fake
> reloc type if at all possible. It's hard to contain once we expose
> the reloc at this level.
>
> E.g. at the moment:
>
> .short x
>
> gives:
>
> Error: reloc 5 not supported by object file format
>
> which isn't a great error message, but is at least an error. :-)
> After the patch it is silently accepted and produces an R_RL reloc.
Wouldn't an R_POS with r_size = 15 relocation entry be correct in that case ?
That's why I initially avoid to use R_RL (but without thinking about your
case).
I suppose most linkers don't accept that, but at least gas will be
correct.
Tristan.
More information about the Binutils
mailing list