2.14.90.0.5 (Debian unstable) works for mkelfImage 2.5 but won't link LinuxBIOS.
2.12.90.0.1 (Debian stable) works for LinuxBIOS but mkelfimage 2.5 complains about no a5 magic.
Am I stuck with two versions of binutils? Or maybe you know how to make LB link with the latest binutils? It looks like a binutils bug.
Here is my link error:
[snip] cp linuxbios_payload.nrv2b linuxbios_payload echo "INCLUDE ldoptions" > ldscript.ld ; for file in /usr/src/linuxbios/linuxbios/src/arch/i386/config/ldscript.base /usr/src/linuxbios/linuxbios/src/cpu/i386/entry16.lds /usr/src/linuxbios/linuxbios/src/cpu/i386/entry32.lds /usr/src/linuxbios/linuxbios/src/cpu/i386/reset16.lds /usr/src/linuxbios/linuxbios/src/arch/i386/lib/id.lds /usr/src/linuxbios/linuxbios/src/arch/i386/lib/failover-noz.lds ; do echo "INCLUDE $file" >> ldscript.ld ; done gcc -nostdlib -nostartfiles -static -o linuxbios -T ldscript.ld crt0.o crt0.o(.reset+0x1): In function `reset_vector': : relocation truncated to fit: R_386_PC16 _start_offset collect2: ld returned 1 exit status make[1]: *** [linuxbios] Error 1 make[1]: Leaving directory `/usr/src/linuxbios/tyan' make: *** [xtyan] Error 2
Jeff Noxon jeff@planetfall.com writes:
2.14.90.0.5 (Debian unstable) works for mkelfImage 2.5 but won't link LinuxBIOS.
This one is change in behavior of binutils.
2.12.90.0.1 (Debian stable) works for LinuxBIOS but mkelfimage 2.5 complains about no a5 magic.
That is a binutils bug.
Am I stuck with two versions of binutils? Or maybe you know how to make LB link with the latest binutils? It looks like a binutils bug.
The code in the freebios2:src/cpu/i386/reset16.inc should avoid this problem, but oit does not generate a far jump only a near jump.
The problem binutils does not do a good job of supporting 16bit offsets. If you would like to pull the code back and generate a patch for the freebios1 tree it would be appreciated.
Eric
Is there something wrong with the near jump approach?
I will attempt to pull freebios2 from cvs. Sourceforge CVS seems not to work most of the time I try to use it. It would be nice to have CVS hosted somewhere reliable, maybe BerliOS.
Is freebios2 booting yet on any platforms?
On Thu, Aug 14, 2003 at 12:11:37PM -0600, Eric W. Biederman wrote:
The code in the freebios2:src/cpu/i386/reset16.inc should avoid this problem, but oit does not generate a far jump only a near jump.
The problem binutils does not do a good job of supporting 16bit offsets. If you would like to pull the code back and generate a patch for the freebios1 tree it would be appreciated.
On Thu, 14 Aug 2003, Jeff Noxon wrote:
Is freebios2 booting yet on any platforms?
Both PPC and K8 platforms. We need to try to cut a 386 machine over, I am going to try with the AMD Elan boards.
ron
* Jeff Noxon jeff@planetfall.com [030814 19:55]:
2.14.90.0.5 (Debian unstable) works for mkelfImage 2.5 but won't link LinuxBIOS.
do you have x86-64 support enabled in these binutils? This breaks relocations 32->16bit.
Here is my link error:
crt0.o(.reset+0x1): In function `reset_vector': : relocation truncated to fit: R_386_PC16 _start_offset collect2: ld returned 1 exit status
src/cpu/i386/reset16.inc is the culprit. See the freebios2 tree for a wild but working implementation of reset16.inc. The "jmp _start" is there implemented as: reset_vector: /* jmp _start */ .byte 0xe9 .int _start - ( . + 2 )
This should also be changed in the old LinuxBIOS tree. It works fine.
Stefan