This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch V2]: xcoff: fix 16 bit relative branches
- From: Tristan Gingold <gingold at adacore dot com>
- To: Richard Sandiford <rsandifo at linux dot vnet dot ibm dot com>
- Cc: "binutils\ at sourceware dot org Development" <binutils at sourceware dot org>
- Date: Wed, 24 Jul 2013 16:13:02 +0200
- Subject: Re: [Patch V2]: xcoff: fix 16 bit relative branches
- References: <7A33CD48-7AFB-4820-91FA-5B94E328F938 at adacore dot com> <874nbzvhp3 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <5501CDEA-492B-484F-BDE6-06D58193D424 at adacore dot com> <87ppuhjtpe dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <A445FA05-BF3B-4183-95C5-24DF8178CEE9 at adacore dot com> <8738rag740 dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <E6BF4B61-1B82-4C1D-BD5F-A5C7F7BC6C99 at adacore dot com> <87ehaqo8tf dot fsf at sandifor-thinkpad dot stglab dot manchester dot uk dot ibm dot com> <593493B3-1FCC-4EBA-B362-D1B6193BA6A3 at adacore dot com>
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.