mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ivo Clarysse <ivo.clarysse@gmail.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: board_init_lowlevel_return: Error: symbol ABS is in a different  section
Date: Wed, 19 May 2010 13:58:02 +0200	[thread overview]
Message-ID: <AANLkTikkA8YbPdjBN0mzrRkleZo3NEH6gziW2t-jgyXA@mail.gmail.com> (raw)
In-Reply-To: <20100519112750.GN31199@pengutronix.de>

On Wed, May 19, 2010 at 1:27 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
[...]
>> Is this a problem with the toolchain I use, or should barebox be patched ?
>
> This works with our toolchain, but it may be that I used some 'feature'
> which is not supposed to work. Anyway, I like the way you did it above
> better as my approach, so how about the following patch which is a
> slight modification from yours:
>
>
> From 84aea4781ec1e99481530b4d5a122ce4e95d2266 Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Wed, 19 May 2010 13:23:43 +0200
> Subject: [PATCH] arm start.c: Make runtime function address calculation tolerant for more compilers

This builds using the CodeSourcery G++ toolchain (compile-tested only,
with releases 2009q3 and 2010q1).

I couldn't find anything in the GAS manual that would explain the
presence of an automatic "0:" label.

http://sourceware.org/binutils/docs-2.20/as/ARM-Opcodes.html#ARM-Opcodes  :

ADR

                adr <register> <label>


    This instruction will load the address of label into the indicated
register. The instruction will evaluate to a PC relative ADD or SUB
instruction depending upon where the label is located. If the label is
out of range, or if it is not defined in the same file (and section)
as the ADR instruction, then an error will be generated. This
instruction will not make use of the literal pool.

http://sourceware.org/binutils/docs-2.20/as/Labels.html#Labels :

A label is written as a symbol immediately followed by a colon `:'.
The symbol then represents the current value of the active location
counter, and is, for example, a suitable instruction operand. You are
warned if you use the same symbol to represent two different
locations: the first definition overrides any other definitions.

http://sourceware.org/binutils/docs-2.20/as/Symbol-Names.html#Symbol-Names :

Local Labels

[...]
There is no restriction on how you can use these labels, and you can
reuse them too. So that it is possible to repeatedly define the same
local label (using the same number `N'), although you can only refer
to the most recently defined local label of that number (for a
backwards reference) or the next definition of a specific local label
for a forward reference. It is also worth noting that the first 10
local labels (`0:'...`9:') are implemented in a slightly more
efficient manner than the others.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2010-05-19 11:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18 11:40 Ivo Clarysse
2010-05-19 11:27 ` Sascha Hauer
2010-05-19 11:58   ` Ivo Clarysse [this message]

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=AANLkTikkA8YbPdjBN0mzrRkleZo3NEH6gziW2t-jgyXA@mail.gmail.com \
    --to=ivo.clarysse@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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