From: Daniel Jacobowitz <drow@false.org>
To: Richard Earnshaw <rearnsha@gcc.gnu.org>
Cc: Julian Brown <julian@codesourcery.com>, binutils@sources.redhat.com
Subject: Re: [PATCH] Fix thumb calls via PLT on ARM/SymbianOS
Date: Wed, 16 Mar 2005 15:27:00 -0000 [thread overview]
Message-ID: <20050316144218.GA27174@nevyn.them.org> (raw)
In-Reply-To: <1110982992.19581.35.camel@pc960.cambridge.arm.com>
On Wed, Mar 16, 2005 at 02:23:12PM +0000, Richard Earnshaw wrote:
> On Wed, 2005-03-16 at 14:17, Julian Brown wrote:
> > Hi,
> >
> > This patch fixes calls made from thumb mode via the PLT on SymbianOS.
> > PLT entries are written in ARM mode, but previously they were being
> > called in thumb mode, with their address incorrectly offset by -4
> > (PLT_THUMB_STUB_SIZE).
> >
> > Now, the target address has been corrected and the thumb BL instruction
> > is rewritten as BLX to perform the mode switch before attempting to
> > execute the PLT entry. (BLX is an armv5t instruction, but as SymbianOS
> > is only targeted at armv5t+, this should always be OK.)
> >
> > The hardwired "4" for the thumb stub size on non-SymbianOS targets has
> > also been rewritten as PLT_THUMB_STUB_SIZE.
> >
> > OK to apply?
>
> This sounds like a hack. I'd much rather a generic solution were found
> (and which permitted the blx optimization if available).
The SymbianOS bits sound generally right to me. The fact that the -4
bias is currently included is just a bug; that's from the code to
generate a Thumb header on PLT entries, which is already disabled
for SymbianOS.
OTOH, it may be missing some error checks - what if it's _not_ a BL?
Could we reach here?
Ideally, yes, I want to do this transformation on non-SymbianOS too.
But, we don't have a clear indicator saying "yes it is save to generate
blx" yet.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-03-16 14:42 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-16 14:52 Julian Brown
2005-03-16 14:56 ` Richard Earnshaw
2005-03-16 15:27 ` Daniel Jacobowitz [this message]
2005-03-16 16:10 ` Julian Brown
2005-03-16 16:29 ` Richard Earnshaw
2005-03-16 16:34 ` Julian Brown
2005-03-16 16:42 ` Ian Lance Taylor
2005-03-16 16:54 ` Richard Earnshaw
2005-03-16 17:16 ` Ian Lance Taylor
2005-03-16 17:34 ` Richard Earnshaw
2005-03-16 22:00 ` Ian Lance Taylor
2005-03-17 0:13 ` Richard Earnshaw
2005-03-18 19:59 ` Julian Brown
2005-03-17 20:58 ` [PATCH] Fix thumb calls via PLT on ARM/SymbianOS (rfc) Julian Brown
2005-03-17 21:03 ` Question! NK
2005-03-23 20:11 ` Question! Nick Clifton
2005-03-17 21:25 ` [PATCH] Fix thumb calls via PLT on ARM/SymbianOS (rfc) Paul Brook
2005-03-16 16:16 ` [PATCH] Fix thumb calls via PLT on ARM/SymbianOS Richard Earnshaw
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=20050316144218.GA27174@nevyn.them.org \
--to=drow@false.org \
--cc=binutils@sources.redhat.com \
--cc=julian@codesourcery.com \
--cc=rearnsha@gcc.gnu.org \
/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).