Subject: RE: Cross Compiler again

From: [email-masked]
Date: Mon, 26 Nov 2001 09:59:52 +0100

> If you simply fix the one declaration it complains about (it involves
> adding 'volatile' to one of the two declarations of xtime) then this
> kernel actually will work under GCC 3.0.1.  We haven't QA'd it, but I
> use it routinely for testing.
> 
Thanks. Compiling now works, but the linker complains about undefined
references:

init/main.o: In function `init':
init/main.c:794: relocation truncated to fit: R_MIPS_GPREL16 execute_command
init/main.o: In function `parse_options':
init/main.o(.text.init+0x7d8): relocation truncated to fit: R_MIPS_GPREL16
execute_command
arch/mips/kernel/kernel.o(.debug+0x32e14): undefined reference to `L_E660'
arch/mips/kernel/kernel.o(.debug+0x60e7c): undefined reference to `L_E549'
arch/mips/kernel/kernel.o(.debug+0x8d097): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d0b9): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d168): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d18a): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d31f): undefined reference to `L_E8867'
arch/mips/kernel/kernel.o(.debug+0x8d3b6): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d3d8): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d52d): undefined reference to `L_E8867'
arch/mips/kernel/kernel.o(.debug+0x8d5c4): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d5e6): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d6f2): undefined reference to `L_E8867'
arch/mips/kernel/kernel.o(.debug+0x8d718): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x8d762): undefined reference to `L_E8015'
arch/mips/kernel/kernel.o(.debug+0x172bec): undefined reference to `L_E8153'
arch/mips/kernel/kernel.o(.debug+0x19dea0): undefined reference to `L_E111'
arch/mips/kernel/kernel.o(.debug+0x19debe): undefined reference to `L_E1321'
arch/mips/kernel/kernel.o(.debug+0x1f64f2): undefined reference to `L_E7978'
arch/mips/kernel/kernel.o(.debug+0x1f662a): undefined reference to `L_E7978'

It goes on like this for 800 lines. Does anyone know why this happens?

regards
Andre

---

From: Ralf Baechle <[email-masked]>
Date: Mon, 26 Nov 2001 22:22:16 +1100

> init/main.c:794: relocation truncated to fit: R_MIPS_GPREL16 execute_command
                                                ^^^^^^^^^^^^^^

Shit in, shit out.  You must be invoking the compiler with some option for
GP relative optimization.  Won't work.

  Ralf