* ARM/AT91 build failure: Error: symbol *ABS* is in a different section
@ 2010-06-12 13:51 Thomas Petazzoni
2010-06-13 11:08 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2010-06-12 13:51 UTC (permalink / raw)
To: barebox
Hello,
In barebox 2010.05, the at91sam9263ek defconfig was building properly
with my 2009q1 CodeSourcery ARM toolchain. Barebox 2010.06 no longer
builds with the same defconfig/toolchain. The build failure is:
CC arch/arm/cpu/start.o
{standard input}: Assembler messages:
{standard input}:37: Error: symbol *ABS* is in a different section
The commit that introduced the regression is
78104ae181f78d83664fdc7522eb632d9c3b2ec9 (i.e "arm: reimplement startup
code in C").
The part causing the problem is in board_init_lowlevel_return(), more
precisely
/* Get runtime address of this function */
__asm__ __volatile__("adr %0, 0":"=r"(r));
I have investigated further for the moment.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ARM/AT91 build failure: Error: symbol *ABS* is in a different section
2010-06-12 13:51 ARM/AT91 build failure: Error: symbol *ABS* is in a different section Thomas Petazzoni
@ 2010-06-13 11:08 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2010-06-13 11:08 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: barebox
Hi Thomas,
On Sat, Jun 12, 2010 at 03:51:21PM +0200, Thomas Petazzoni wrote:
> Hello,
>
> In barebox 2010.05, the at91sam9263ek defconfig was building properly
> with my 2009q1 CodeSourcery ARM toolchain. Barebox 2010.06 no longer
> builds with the same defconfig/toolchain. The build failure is:
>
> CC arch/arm/cpu/start.o
> {standard input}: Assembler messages:
> {standard input}:37: Error: symbol *ABS* is in a different section
>
> The commit that introduced the regression is
> 78104ae181f78d83664fdc7522eb632d9c3b2ec9 (i.e "arm: reimplement startup
> code in C").
>
> The part causing the problem is in board_init_lowlevel_return(), more
> precisely
>
> /* Get runtime address of this function */
> __asm__ __volatile__("adr %0, 0":"=r"(r));
>
> I have investigated further for the moment.
This was mentioned before and the result was the following patch. Sorry,
somehow I forgot to check it in. It's now in the master branch.
Sascha
commit c21a7fb9f15ee1fb213e22c0e7a9d0f53b274cb2
Author: Sascha Hauer <s.hauer@pengutronix.de>
Date: Wed May 19 13:23:43 2010 +0200
arm start.c: Make runtime function address calculation tolerant for more compilers
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index 67d54a6..eea7dcf 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -81,21 +81,24 @@ void __naked __bare_init reset(void)
*/
void __naked __bare_init board_init_lowlevel_return(void)
{
- uint32_t r;
+ uint32_t r, addr;
+
+ /*
+ * Get runtime address of this function. Do not
+ * put any code above this.
+ */
+ __asm__ __volatile__("1: adr %0, 1b":"=r"(addr));
/* Setup the stack */
r = STACK_BASE + STACK_SIZE - 16;
__asm__ __volatile__("mov sp, %0" : : "r"(r));
- /* Get runtime address of this function */
- __asm__ __volatile__("adr %0, 0":"=r"(r));
-
/* Get start of binary image */
- r -= (uint32_t)&board_init_lowlevel_return - TEXT_BASE;
+ addr -= (uint32_t)&board_init_lowlevel_return - TEXT_BASE;
/* relocate to link address if necessary */
- if (r != TEXT_BASE)
- memcpy((void *)TEXT_BASE, (void *)r,
+ if (addr != TEXT_BASE)
+ memcpy((void *)TEXT_BASE, (void *)addr,
(unsigned int)&__bss_start - TEXT_BASE);
/* clear bss */
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-13 11:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-12 13:51 ARM/AT91 build failure: Error: symbol *ABS* is in a different section Thomas Petazzoni
2010-06-13 11:08 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox