arm-softfloat gcc3.3.3 internal_relocation error
Allen Curtis
acurtis@onz.com
Thu Jun 10 14:17:00 GMT 2004
On Jun 9, 2004, at 11:01 PM, Dan Kegel wrote:
> Allen Curtis wrote:
>> I used the demo-arm-softfloat.sh script to build a GCC 3.3.3 cross
>> compiler. I thought that everything was working fine until I ran into
>> this error:
>> arm-softfloat-linux-gnu-gcc -D__ASSEMBLY__ -D__KERNEL__
>> -I/home/acurtis/localdev/thales/ipcu/linux-2.4.21/include -mapcs-32
>> -D__LINUX_ARM_ARCH__=4 -march=armv4 -msoft-float -c -o getuser.o
>> getuser.S
>> getuser.S: Assembler messages:
>> getuser.S:47: Error: internal_relocation (type: OFFSET_IMM) not fixed
>> up
>> make[2]: *** [getuser.o] Error 1
>> make[2]: Leaving directory
>> `/home/acurtis/localdev/thales/ipcu/linux-2.4.21/arch/arm/lib'
>> Google searches indicate that this is a compiler problem. I am
>> building a 2.4.21 kernel with the following patches:patch-2.4.21-rmk1
>> patch-2.4.21-rmk1-omap
>> patch-1540/1 (from arm.linux.org for float compile issues)
>> Linux 2.6 for OMAP and u-boot compiled successfully. I thought I was
>> home free.
>> Anyone know of a patch?
>
> Hadn't heard of any. Can you post the first 50 lines of getuser.S?
>
/*
* linux/arch/arm/lib/getuser.S
*
* Copyright (C) 2001 Russell King
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Idea from x86 version, (C) Copyright 1998 Linus Torvalds
*
* These functions have a non-standard call interface to make them more
* efficient, especially as they return an error value in addition to
* the "real" return value.
*
* __get_user_X
*
* Inputs: r0 contains the address
* Outputs: r0 is the error code
* r1, r2 contains the zero-extended value
* lr corrupted
*
* No other registers must be altered. (see include/asm-arm/uaccess.h
* for specific ASM register usage).
*
* Note that ADDR_LIMIT is either 0 or 0xc0000000.
* Note also that it is intended that __get_user_bad is not global.
*/
#include <asm/constants.h>
.global __get_user_1
__get_user_1:
bic r1, sp, #0x1f00
bic r1, r1, #0x00ff
ldr r1, [r1, #TSK_ADDR_LIMIT]
sub r1, r1, #1
cmp r0, r1
1: ldrlsbt r1, [r0]
movls r0, #0
movls pc, lr
b __get_user_bad
.global __get_user_2
__get_user_2: /* THE PROBLEM IS HERE. 2.6 USES DIFFERENT REGS, WILL
TRY THAT */
bic ip, sp, #0x1f00
bic ip, ip, #0x00ff
ldr ip, [ip, #TI_ADDR_LIMIT]
sub ip, ip, #2
cmp r0, ip
2: ldrlsbt r1, [r0], #1
3: ldrlsbt ip, [r0]
#ifndef __ARMEB__
orrls r1, r1, ip, lsl #8
#else
orrls r1, ip, r1, lsl #8
#endif
movls r0, #0
movls pc, lr
b __get_user_bad
> Also, does gcc-3.4.0 fail in the same way?
GCC 3.4 failed right out the starting gate. I didn't spend much time
debugging based on the comments in the demo-arm-softfloat.sh file.
Changed the script to build the above mentioned configuration and
plowed forward.
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list