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: Richard Sandiford <rsandifo at linux dot vnet dot ibm dot com>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: "binutils\ at sourceware dot org Development" <binutils at sourceware dot org>
- Date: Mon, 22 Jul 2013 17:31:24 +0100
- 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>
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) */
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.
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.
Otherwise, OK for the bfd and testsuite changes, thanks. I'll punt
on the gas bits :-)
Richard