[LinuxBIOS] LinuxBios V3 build failure
Brendan Trotter
btrotter at gmail.com
Thu Jun 21 22:47:51 CEST 2007
Hi,
On 6/21/07, todthgie <todthgie at hotmail.com> wrote:
> i tried building LinuxBios V3 but it fails..
>
> any suggestions ?
<snip>
> /home/reinder/proj/lbv3/LinuxBIOSv3/build/arch/x86/stage0_i586.o: In
> function `_stage0':
> /home/reinder/proj/lbv3/LinuxBIOSv3/arch/x86/stage0_i586.S:(.text+0xf):
> relocation truncated to fit: R_386_16 against symbol `gdtptr' defined in
> text section in
I had the exact same problem (gcc (GCC) 4.1.2 (Gentoo 4.1.2), GNU
assembler 2.16.1, GNU ld version 2.16.1).
As far as I can tell binutils is mostly broken for 16-bit code and
different versions of binutils is broken in different ways... ;-)
It's fairly easy to fix though - in "/arch/x86/stage0_i586.S" find the
first line with the "lgdt" instruction in it (it's about line number
60) and replace that line with these lines:
movl $gdtptr,%ebx
lgdt %cs:(%bx)
I'm not too sure if that's the only thing I messed with to get it to
work (but I think it is) - to be honest, I stumbled around doing all
sorts of things for a while first (I'm much more used to assemblers
like NASM, and much less familiar with "compiler back-ends pretending
to be assemblers")...
Cheers,
Brendan
More information about the coreboot
mailing list