This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch]: 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: Fri, 19 Jul 2013 11:46:23 +0100
- Subject: Re: [Patch]: 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>
Tristan Gingold <gingold@adacore.com> writes:
> On Jul 17, 2013, at 1:45 PM, Richard Sandiford wrote:
>>
>> So AIX as does put the reloc against the 16-bit field rather than the full
>> instruction, which is what I'd naively have expected from a 16-bit rsize.
>
> Hello,
>
> I now have a patch for this. aix3-aix.o is the binary produced by AIX as,
> while aix3.o is produced by gas:
>
> $ ../binutils/objdump -P relocs -dr aix3*.o
>
> aix3-aix.o: file format aixcoff-rs6000
> ../binutils/objdump: cannot read strings table length
> Relocations for .text (1)
> vaddr sgn mod sz type symndx symbol
> 00000002 S 16 RBR 2 c
>
>
>
> Disassembly of section .text:
>
> 00000000 <.text>:
> 0: 40 82 00 00 bne 0x0
> 2: R_RBR_16 c
>
> aix3.o: file format aixcoff-rs6000
> Relocations for .text (1)
> vaddr sgn mod sz type symndx symbol
> 00000002 S 16 RBR 2 c
>
>
>
> Disassembly of section .text:
>
> 00000000 <.text>:
> 0: 40 82 00 00 bne 0x0
> 2: R_RBR_16 c
Thanks, looks good!
Richard