public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Will Newton <will.newton@linaro.org>
To: Tony Wang <tony.wang@arm.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>,
	nick clifton <nickc@redhat.com>
Subject: Re: [Patch, ARM]Enable veneer routine for R_ARM_THM_JUMP19
Date: Mon, 04 Aug 2014 10:32:00 -0000	[thread overview]
Message-ID: <CANu=DmgtvcDm_oTXpqLOjqUiTVEmZADRAjVpGnw-p16h0cwYjQ@mail.gmail.com> (raw)
In-Reply-To: <009301cfafce$bbf91220$33eb3660$@arm.com>

On 4 August 2014 11:27, Tony Wang <tony.wang@arm.com> wrote:
>> -----Original Message-----
>> From: Will Newton [mailto:will.newton@linaro.org]
>> Sent: Monday, August 04, 2014 5:50 PM
>> To: Tony Wang
>> Cc: binutils@sourceware.org; nickc@redhat.com
>> Subject: Re: [Patch, ARM]Enable veneer routine for R_ARM_THM_JUMP19
>>
>> On 4 August 2014 10:40, Tony Wang <tony.wang@arm.com> wrote:
>> >> -----Original Message-----
>> >> From: Will Newton [mailto:will.newton@linaro.org]
>> >> Sent: Monday, August 04, 2014 5:14 PM
>> >> To: Tony Wang
>> >> Cc: binutils@sourceware.org; nickc@redhat.com
>> >> Subject: Re: [Patch, ARM]Enable veneer routine for
>> R_ARM_THM_JUMP19
>> >>
>> >> On 4 August 2014 05:40, Tony Wang <tony.wang@arm.com> wrote:
>> >> > Hi there,
>> >> >
>> >> > According to AAPCS-ELF specification R_ARM_THM_JUMP19 should also
>> >> > be veneered if the target is outside the addressable span of the
>> >> > branch instruction or where interworking happened.
>> >> >
>> >> > So the attached patch implements the veneer routine for
>> >> > R_ARM_THM_JUMP19, and two new macros
>> >> THM2_MAX_FWD_COND_BRANCH_OFFSET
>> >> > and THM2_MAX_BWD_COND_BRANCH_OFFSET are introduced. Also
>> >> updated the
>> >> > conditional branch for both cases mentioned above.
>> >> >
>> >> > Tested with Binutils regression test, no new regressions. No
>> >> > regression on gcc trunk with target cortex m4
>> >> >
>> >> > Ok for the trunk?
>> >> >
>> >> > bfd/ChangeLog:
>> >> > 2014-08-4  Tony Wang <tony.wang@arm.com>
>> >> >
>> >> >      * elf32-arm.c (elf32_arm_final_link_relocate): Implement the
>> >> > veneer routine for R_ARM_THM_JUMP19.
>> >> >      (arm_type_of_stub): Add conditional clause for
>> R_ARM_THM_JUMP19
>> >> >      (elf32_arm_size_stub): Ditto.
>> >> >
>> >> > ld/testsuite/ChangeLog:
>> >> > 2014-08-4  Tony Wang <tony.wang@arm.com>
>> >> >
>> >> >      * ld-arm/jump-reloc-veneers-cond.s: New test.
>> >> >      * ld-arm/farcall-cond-thumb-arm.s: Ditto.
>> >> >      * ld-arm/jump-reloc-veneers-cond-short.d: Expected output for
>> >> > target without a veneer generation.
>> >> >      * ld-arm/jump-reloc-veneers-cond-long.d: Expected output for
>> >> > target with a veneer generation.
>> >> >      * ld-arm/farcall-cond-thumb-arm.d: Expected output for inter
>> >> > working veneer generation.
>> >> >      * ld-arm/arm-elf.exp: Add tests for conditional branch veneer.
>> >>
>> >> Looks ok to me (although I am not a maintainer). Small details but
>> >> logical operations bind more loosely than almost every other operator
>> >> so in some cases you can drop the brackets around assignments in
>> >> conditionals and make them a bit easier to read.
>> >
>> > I agreed with your point.
>> >
>> >>Also the casts to unsigned int in
>> >> elf32_arm_size_stubs seem unnecessary.
>> >
>> > From my point of view, it might still needed here, as the enum type not
>> always equals to unsigned int.
>>
>> Fair enough, its not a big issue.
>>
>> I also noticed a testsuite failure for armeb:
>>
>> /home/will/linaro/binutils-arm/ld/../binutils/objdump -d tmpdir/jump-reloc-
>> veneers-cond-long
>> regexp_diff match failure
>> regexp "^    80..:      8002f040        .word   0x8002f040$"
>> line   "    8000:       f0408002        .word   0xf0408002"
>> FAIL: R_ARM_THM_JUMP19 Relocation veneers: Long
>>
>
> Hi Will,
> Thanks a lot for your report, and are you using the big endian toolchain? It looks like an endian issue. I only tested it with little endian toolchain.

I configured binutils with --target=armeb-none-eabi, although I also
found that armeb EABI targets seem to be broken in general so I
submitted a patch to fix that.

-- 
Will Newton
Toolchain Working Group, Linaro

  reply	other threads:[~2014-08-04 10:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04  4:40 Tony Wang
2014-08-04  9:14 ` Will Newton
2014-08-04  9:41   ` Tony Wang
2014-08-04  9:50     ` Will Newton
2014-08-04 10:27       ` Tony Wang
2014-08-04 10:32         ` Will Newton [this message]
2014-08-05  1:46           ` Tony Wang
2014-08-12  2:25           ` Tony Wang
2014-08-19  2:38           ` Tony Wang
2014-08-19  8:05             ` Will Newton
2014-08-20 15:50             ` Nicholas Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANu=DmgtvcDm_oTXpqLOjqUiTVEmZADRAjVpGnw-p16h0cwYjQ@mail.gmail.com' \
    --to=will.newton@linaro.org \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=tony.wang@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).