Skip to contentSkip to conversation

Link error gcc3.3.1

DISCUSSION [email protected] 2 participants 2 messages Oct 28, 2004 MIPS

lore
Share & tools
lore
#0 lore raw

Hello,

I have a question about gcc3.3.1.

Compiling source codes when using gcc3.3.1, I encounter the link error.

<<< error messages >>>
make[1]: Leaving directory `/home/mvista/u-boot-1.1.1-mips1022/post/cpu'
mips_fp_le-gcc -Wa,-gstabs -D__ASSEMBLY__ -g -DDEBUG -Os -D__KERNEL__
-DTEXT_BASE=0xbfc00000 -I/home/mvista/u-boot-1.1.1-mips1022/include -fno-builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include -pipe -DCONFIG_MIPS -D__MIPS__ -march=4kc -mabicalls -c -o cpu/mips/start.o /home/mvista/u-boot-1.1.1-mips1022/cpu/mips/start.S /home/mvista/u-boot-1.1.1-mips1022/cpu/mips/start.S: Assembler messages:
/home/mvista/u-boot-1.1.1-mips1022/cpu/mips/start.S:247: Error: Cannot branch to undefined symbol. /home/mvista/u-boot-1.1.1-mips1022/cpu/mips/start.S:252: Error: Cannot branch to undefined symbol. /home/mvista/u-boot-1.1.1-mips1022/cpu/mips/start.S:264: Error: Cannot branch to undefined symbol.
make: *** [cpu/mips/start.o] Error 1

However, ".globl memsetup" is defined by the source code of (*2). Did anyone encounter the same error ?
In addition, this error is not generated in gcc3.2.3.

(*1):u-boot-1.1.1/cpu/mips/start.S

	/* Initialize any external memory.
	 */
	bal	memsetup  /* <<< error occured */
	nop

(*2):u-boot-1.1.1/board/dbau1x00/memsetup.S

	.text
	.set noreorder
	.set mips32

	.globl	memsetup

memsetup:
/*
* Step 1) Establish CPU endian mode.
* Db1500-specific:
* Switch S1.1 Off(bit7 reads 1) is Little Endian
* Switch S1.1 On (bit7 reads 0) is Big Endian */
li t0, MEM_STCFG1

Best regards,
Nyauyama.

#1 lore raw
Quoted 2 lines · In message <[email protected]> you wrote:

Compiling source codes when using gcc3.3.1, I encounter the link error.

...

Quoted 1 line

/home/mvista/u-boot-1.1.1-mips1022/cpu/mips/start.S:247: Error: Cannot branch to undefined symbol.

Please see http://www.spinics.net/lists/mips/msg16534.html
or go directly to http://sources.redhat.com/ml/binutils/2004-04/msg00476.html

Best regards,

Wolfgang Denk

Signature · 3 lines
See us @ Embedded/Electronica Munich, Nov 09 - 12, Hall A.6 Booth 513
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [email protected]
Contrary to popular belief, thinking does not cause brain damage.