From: Ivo Clarysse <ivo.clarysse@gmail.com>
To: barebox@lists.infradead.org
Subject: board_init_lowlevel_return: Error: symbol ABS is in a different section
Date: Tue, 18 May 2010 13:40:11 +0200 [thread overview]
Message-ID: <AANLkTikXvBdVzs2w51dzow9V7myhkvq0sSWUNMzPWn23@mail.gmail.com> (raw)
When compiling barebox recently, I get an error:
[..]
arm-none-linux-gnueabi-gcc -Wp,-MD,arch/arm/cpu/.start.o.d
-nostdinc -isystem
/opt/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/include
-D__KERNEL__ -D__BAREBOX__ -Iinclude
-I/home/imxbuild/barebox-master/build-mx25pdk/arch/arm/include
-I/home/imxbuild/barebox-master/build-mx25pdk/arch/arm/include
-include include/linux/autoconf.h -fno-builtin -ffreestanding
-D__ARM__ -fno-strict-aliasing -marm -mlittle-endian -mabi=apcs-gnu
-mno-thumb-interwork -D__LINUX_ARM_ARCH__=5 -march=armv5te
-mtune=arm9tdmi -Iarch/arm/mach-imx/include -DTEXT_BASE=0x83F00000 -P
-fdata-sections -ffunction-sections -Wall -Wundef -Wstrict-prototypes
-Wno-trigraphs -fno-strict-aliasing -fno-common -Os -pipe
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(start)"
-D"KBUILD_MODNAME=KBUILD_STR(start)" -c -o arch/arm/cpu/start.o
arch/arm/cpu/start.c
{standard input}: Assembler messages:
{standard input}:37: Error: symbol *ABS* is in a different section
make[1]: *** [arch/arm/cpu/start.o] Error 1
make: *** [arch/arm/cpu] Error 2
This seems to be due to:
[...]
void __naked __bare_init board_init_lowlevel_return(void)
{
uint32_t r;
/* 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));
[...]
Which yields the following assembly:
@ 0 "" 2
.size exception_vectors, .-exception_vectors
.section .text_bare_init.text,"ax",%progbits
.align 2
.global board_init_lowlevel_return
.type board_init_lowlevel_return, %function
board_init_lowlevel_return:
@ Naked Function: prologue and epilogue provided by programmer.
@ args = 0, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
ldr r3, .L7
#APP
@ 900 "start.i" 1
mov sp, r3
@ 0 "" 2
@ 901 "start.i" 1
adr r1, 0
@ 0 "" 2
[...]
My toolchain (CodeSourcery G++ Lite, 2009Q3 - also tested with the
2010Q1 release), does not seem to like "adr r1, 0".
I can get it to compile, by changing change board_init_lowlevel to:
void __naked __bare_init board_init_lowlevel_return(void)
{
uint32_t r;
__asm__ __volatile__("1:");
/* 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, 1b":"=r"(r));
[...]
Is this a problem with the toolchain I use, or should barebox be patched ?
Ivo.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2010-05-18 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 11:40 Ivo Clarysse [this message]
2010-05-19 11:27 ` Sascha Hauer
2010-05-19 11:58 ` Ivo Clarysse
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=AANLkTikXvBdVzs2w51dzow9V7myhkvq0sSWUNMzPWn23@mail.gmail.com \
--to=ivo.clarysse@gmail.com \
--cc=barebox@lists.infradead.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