public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@wasabisystems.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: binutils@sources.redhat.com
Subject: Re: RFA: Support for Thumb in dynamic objects
Date: Wed, 17 Nov 2004 01:37:00 -0000	[thread overview]
Message-ID: <m34qjpqmqs.fsf@gossamer.airs.com> (raw)
In-Reply-To: <20041116233909.GA31434@nevyn.them.org>

Daniel Jacobowitz <drow@false.org> writes:

> This patch adds limited support for Thumb in dynamic objects.  It causes the
> glue stubs not to be exported from the object, and uses a prefix to the PLT
> entry to change mode instead of a glue stub off somewhere else.  It also
> fixes objdump to display thumb functions using the STT_ARM_TFUNC type as
> functions.
> 
> It's easy to stop using STT_ARM_TFUNC and start using an odd symbol value
> for dynamic objects; but I didn't want to mix it with this patch.  So that's
> a TODO.  Other TODOs are:
>   - some kind of mappng symbols in the .plt section so that the disassembler
>     knows what to do (we can't easily generate new local symbols from the
>     backend, but I'm sure there's a way around it); this is very important
>     for GDB.
>   - Related, synthetic named symbols for the .plt as implemented for other
>     architectures.
>   - BLX support.  The only reason I didn't do this is that there's no easy
>     way to tell if using BLX is OK; i.e. whether we can assume the presence
>     of ARM v5t.
> 
> OK?  Comments?

My main comment is that I've done similar work, but I had the luxury
of simply assuming ARMv5t.  You can do so much better in that case
that I do think we need to let the linker make that assumption when
possible.  The easy way to do it automatically would be to say that if
any input .o file is marked for a processor supporting ARMv5t or
above, we can assume that the output will be too, and we can use
ARMv5t in the PLT support, etc.

There is, of course, a second related issue, which is whether the
other objects involved in the dynamic link are compiled with
interworking support.  In my case I could not assume that.  So while
my linker doesn't add a stub for each R_ARM_THM_PC22 reloc--it just
changes those to blx when appropriate--it does automatically add a
stub for ABS32 and GOT32 references to Thumb code.  I don't have a
good automatic solution here--perhaps the new new ABI, which I gather
requires interworking support, will take the issue off the table.

Along similar lines it is quite easy for the linker to generate stubs
for all functions potentially referenced by non-interworking code, so
the need for the -mcallee-super-interworking option goes away.

Ian

  parent reply	other threads:[~2004-11-17  1:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16 23:39 Daniel Jacobowitz
2004-11-17  0:22 ` Paul Brook
2004-11-17  0:37   ` Daniel Jacobowitz
2004-11-17  1:37 ` Ian Lance Taylor [this message]
2004-11-17  3:02   ` Daniel Jacobowitz
2004-11-17  3:42     ` Ian Lance Taylor
2004-11-17 13:48 ` Richard Earnshaw
2004-11-17 16:49   ` Daniel Jacobowitz
2004-11-17 17:00     ` Richard Earnshaw
2004-11-17 17:05       ` Daniel Jacobowitz
2004-11-17 17:12         ` Richard Earnshaw
2004-11-17 17:36           ` Daniel Jacobowitz
2004-11-17 17:39             ` 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=m34qjpqmqs.fsf@gossamer.airs.com \
    --to=ian@wasabisystems.com \
    --cc=binutils@sources.redhat.com \
    --cc=drow@false.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).