This is the mail archive of the binutils@sourceware.org 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 V2]: xcoff: fix 16 bit relative branches


On Jul 23, 2013, at 5:09 PM, Tristan Gingold wrote:

> 
> On Jul 22, 2013, at 6:31 PM, Richard Sandiford wrote:
> 
>> Tristan Gingold <gingold@adacore.com> writes:
>>> diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c
>>> index 9abe04d..3f60184 100644
>>> --- a/bfd/coff-rs6000.c
>>> +++ b/bfd/coff-rs6000.c
>>> @@ -952,7 +952,7 @@ reloc_howto_type xcoff_howto_table[] =
>>> 	 0xffff,		/* dst_mask */
>>> 	 FALSE),		/* pcrel_offset */
>>> 
>>> -  /* Modifiable relative branch.  */
>>> +  /* 0x14 Modifiable relative branch.  */
>>>  HOWTO (R_RRTBI,		 /* type */
>>> 	 1,			/* rightshift */
>>> 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
>>> @@ -1012,7 +1012,7 @@ reloc_howto_type xcoff_howto_table[] =
>>> 	 0xffff,		/* dst_mask */
>>> 	 FALSE),		/* pcrel_offset */
>>> 
>>> -  /* Modifiable branch absolute.  */
>>> +  /* 0x18 Modifiable branch absolute.  */
>>>  HOWTO (R_RBA,			/* type */
>>> 	 0,			/* rightshift */
>>> 	 2,			/* size (0 = byte, 1 = short, 2 = long) */
>>> @@ -1072,7 +1072,7 @@ reloc_howto_type xcoff_howto_table[] =
>>> 	 0xffff,		/* dst_mask */
>>> 	 FALSE),		/* pcrel_offset */
>>> 
>>> -  /* 16 bit Non modifiable absolute branch.  */
>>> +  /* 0x1c: 16 bit Non modifiable absolute branch.  */
>>>  HOWTO (R_BA,			/* type */
>>> 	 0,			/* rightshift */
>>> 	 1,			/* size (0 = byte, 1 = short, 2 = long) */
>> 
> Hello,
> 
>> Wasn't sure whether this was part of the patch or just something you
>> did for debugging.  If it's part of the patch, we should probably do
>> it for all entries, and do it in coff64-rs6000.c too.
> 
> Yes, that was part of the patch, to read *_rtype2howto and
> reloc_type_lookup more easily.  Added for all entries.
> 
>> Would you mind also adding "bnel" tests to xcoff-br16-1.s and
>> xcoff-br16-2.s?  It sounds like they might have failed without your
>> 0xffff->0xfffc change, whereas plain bne wouldn't be affected.
> 
> Added.
> 
>> Otherwise, OK for the bfd and testsuite changes, thanks.  I'll punt
>> on the gas bits :-)
> 
> Here is the patch updated. I plan to commit it soon, unless someone
> is against.

Now committed.

Tristan.


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