public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@arm.com>
To: Richard Sandiford <richard.sandiford@linaro.org>
Cc: binutils@sourceware.org, patches@linaro.org
Subject: Re: Fix assembly of Thumb pcrel LDRs against global symbols
Date: Wed, 02 Mar 2011 15:18:00 -0000	[thread overview]
Message-ID: <1299079089.24968.14.camel@e102346-lin.cambridge.arm.com> (raw)
In-Reply-To: <g4tyfoxqlj.fsf@linaro.org>


On Mon, 2011-02-28 at 12:59 +0000, Richard Sandiford wrote:
> The PC-relative LDR instructions have no associated relocation,
> so even LDRs for global symbols should be resolved by the assembler.
> We currently handle this correctly for single-register ARM loads,
> but we're missing the associated relocation types for LDRD and Thumb.
> This leads to errors like:

I'm not sure I agree with this.  If I write

.global foo

...
	ldr r0, foo

...

foo:
	...

but then at link/load time pre-empt foo with some other definition, that
will silently leave me with the wrong answer.

It's clearly OK to do this if foo is protected or private, but not
otherwise.

The existing error message is not very informative as to what the
problem is, but I'm not sure I agree with your solution...

R.


  parent reply	other threads:[~2011-03-02 15:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-28 12:59 Richard Sandiford
2011-03-01 11:26 ` Dave Martin
2011-03-01 13:50   ` Richard Sandiford
2011-03-02 15:18 ` Richard Earnshaw [this message]
2011-03-02 16:36   ` Richard Sandiford
2011-03-02 16:37   ` Dave Martin
2011-03-02 16:45     ` Richard Earnshaw
2011-03-02 17:04       ` Dave Martin

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=1299079089.24968.14.camel@e102346-lin.cambridge.arm.com \
    --to=rearnsha@arm.com \
    --cc=binutils@sourceware.org \
    --cc=patches@linaro.org \
    --cc=richard.sandiford@linaro.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).