From: Daniel Jacobowitz <drow@false.org>
To: Richard Earnshaw <rearnsha@arm.com>
Cc: johnmc@sidsa.es, binutils@sources.redhat.com
Subject: Re: plt for arm gnu thumb
Date: Tue, 18 Apr 2006 15:49:00 -0000 [thread overview]
Message-ID: <20060418154515.GA13751@nevyn.them.org> (raw)
In-Reply-To: <1145373227.14054.16.camel@pc960.cambridge.arm.com>
On Tue, Apr 18, 2006 at 04:13:47PM +0100, Richard Earnshaw wrote:
> There's only ever going to be a problem if you try to run on an
> Architecture v4T device. These chips cannot transition to Thumb mode
> when loading a PC value from memory, but need instead to use a BX
> instruction. The problem is that for a shared library trampoline we
> need to:
>
> - preserve all of r0-r11, r13 and r14
> - have the 'index' of the called function in ip
>
> There's simply no way to achieve all that efficiently and support proper
> interworking on these devices. (v5 and later chips can swap from ARM to
> Thumb on a load into the PC, so there is no problem there).
>
> We investigated this quite thoroughly as part of the EABI development.
> We concluded that given that the standard trampoline would work on all
> v4 and earlier chips and all v5 or later chips (ie everything but v4T),
> and that on v4T the sequence works if the target of the call is entered
> in ARM state, the best solution overall was to mandate that on a v4T
> device, the called address must be an ARM instruction (it can transition
> to Thumb state immediately thereafter).
>
> In theory this could all be handled by the linker when constructing the
> library, but currently the GNU linker does not do this.
Oh, right; I forgot about this issue.
I did once implement alternate PLT sequences which could target Thumb,
even on v4t. However, they are mighty awkward, so I would strongly
prefer not to submit the patch. John, are you really using v4t?
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2006-04-18 15:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 13:06 johnmc
2006-04-18 13:10 ` Daniel Jacobowitz
2006-04-18 15:14 ` johnmc
2006-04-18 15:45 ` Richard Earnshaw
2006-04-18 15:49 ` Daniel Jacobowitz [this message]
2006-04-18 16:01 ` Richard Earnshaw
2006-04-18 16:49 ` Daniel Jacobowitz
[not found] ` <4596.195.53.86.158.1145376723.squirrel@webmail>
[not found] ` <20060418203900.GA23304@nevyn.them.org>
[not found] ` <1178.195.53.86.158.1145458815.squirrel@webmail>
[not found] ` <20060419150716.GA13655@nevyn.them.org>
2006-04-20 14:32 ` johnmc
2006-04-20 14:38 ` Richard Earnshaw
[not found] ` <1507.195.53.86.158.1145536917.squirrel@webmail>
[not found] ` <1145538390.16122.39.camel@pc960.cambridge.arm.com>
[not found] ` <1576.195.53.86.158.1145540607.squirrel@webmail>
[not found] ` <1145541382.16122.62.camel@pc960.cambridge.arm.com>
2006-04-24 18:23 ` johnmc
2006-04-25 17:19 ` Nick 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=20060418154515.GA13751@nevyn.them.org \
--to=drow@false.org \
--cc=binutils@sources.redhat.com \
--cc=johnmc@sidsa.es \
--cc=rearnsha@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).