<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
As promised here is the patch for first the --build-on problem and also
the final linker problem. Although I consider the second one a patch
rather than a fix.. :-)<br>
<br>
I have compiled this and tested it with FILO under QEMU. I think this
will take care of all of the other builds as well. At least teh i386
ones.. :-)<br>
<br>
Files Modified: <br>
LinuxBIOSv2/src/arch/i386/Config.lb<br>
LinuxBIOSv2/src/arch/i386/lib/id.lds<br>
LinuxBIOSv2/src/config/Config.lb<br>
/*************************Patch***********************************************<br>
diff -C 3 -r -x .svn LinuxBIOSv2.orig/src/arch/i386/Config.lb
LinuxBIOSv2/src/arch/i386/Config.lb<br>
*** LinuxBIOSv2.orig/src/arch/i386/Config.lb 2007-12-06
10:06:31.000000000 -0500<br>
--- LinuxBIOSv2/src/arch/i386/Config.lb 2007-12-04
16:25:13.000000000 -0500<br>
***************<br>
*** 100,106 ****<br>
<br>
makerule linuxbios <br>
depends "crt0.o init.o $(LINUXBIOS_APC)
$(LINUXBIOS_RAM_ROM) ldscript.ld"<br>
! action "$(CC) -nostdlib -nostartfiles -static -o $@ -T
ldscript.ld crt0.o init.o"<br>
action "$(CROSS_COMPILE)nm -n linuxbios | sort >
linuxbios.map"<br>
end<br>
<br>
--- 100,106 ----<br>
<br>
makerule linuxbios <br>
depends "crt0.o init.o $(LINUXBIOS_APC)
$(LINUXBIOS_RAM_ROM) ldscript.ld"<br>
! action "$(CC) -Wl,--build-id=none -nostdlib -nostartfiles
-static -o $@ -T ldscript.ld crt0.o init.o"<br>
action "$(CROSS_COMPILE)nm -n linuxbios | sort >
linuxbios.map"<br>
end<br>
<br>
diff -C 3 -r -x .svn LinuxBIOSv2.orig/src/arch/i386/lib/id.lds
LinuxBIOSv2/src/arch/i386/lib/id.lds<br>
*** LinuxBIOSv2.orig/src/arch/i386/lib/id.lds 2007-12-06
10:06:31.000000000 -0500<br>
--- LinuxBIOSv2/src/arch/i386/lib/id.lds 2007-12-06
10:36:31.000000000 -0500<br>
***************<br>
*** 1,5 ****<br>
SECTIONS {<br>
! . = (_ROMBASE + ROM_IMAGE_SIZE - 0x10) - (__id_end - __id_start);<br>
.id (.): {<br>
*(.id)<br>
}<br>
--- 1,11 ----<br>
SECTIONS {<br>
! <br>
! /*<br>
! * . = (_ROMBASE + (ROM_IMAGE_SIZE - 0x10)) - (__id_end -
__id_start);<br>
! * This is a temporary fix. Under Fedora 8 ld does not like
it if the .id section is above address 0xFFFF_EF00 <br>
! */<br>
! _ROMTEMP = 0xffffef00;<br>
! . = _ROMTEMP;<br>
.id (.): {<br>
*(.id)<br>
}<br>
Only in LinuxBIOSv2/src/arch/i386/lib: id.lds~<br>
diff -C 3 -r -x .svn LinuxBIOSv2.orig/src/config/Config.lb
LinuxBIOSv2/src/config/Config.lb<br>
*** LinuxBIOSv2.orig/src/config/Config.lb 2007-12-06
10:06:30.000000000 -0500<br>
--- LinuxBIOSv2/src/config/Config.lb 2007-12-04 16:27:48.000000000
-0500<br>
***************<br>
*** 40,51 ****<br>
<br>
makerule linuxbios_ram.o<br>
depends "$(DRIVER) linuxbios.a $(LIBGCC_FILE_NAME)" <br>
! action "$(CC) -nostdlib -r -o $@ c_start.o $(DRIVER)
linuxbios.a $(LIBGCC_FILE_NAME)"<br>
end<br>
<br>
makerule linuxbios_ram<br>
depends "linuxbios_ram.o $(TOP)/src/config/linuxbios_ram.ld
ldoptions" <br>
! action "$(CC) -nostdlib -nostartfiles -static -o $@ -T
$(TOP)/src/config/linuxbios_ram.ld linuxbios_ram.o"<br>
action "$(CROSS_COMPILE)nm -n linuxbios_ram | sort >
linuxbios_ram.map"<br>
end<br>
<br>
--- 40,51 ----<br>
<br>
makerule linuxbios_ram.o<br>
depends "$(DRIVER) linuxbios.a $(LIBGCC_FILE_NAME)" <br>
! action "$(CC) -Wl,--build-id=none -nostdlib -r -o $@ c_start.o
$(DRIVER) linuxbios.a $(LIBGCC_FILE_NAME)"<br>
end<br>
<br>
makerule linuxbios_ram<br>
depends "linuxbios_ram.o $(TOP)/src/config/linuxbios_ram.ld
ldoptions" <br>
! action "$(CC) -Wl,--build-id=none -nostdlib -nostartfiles
-static -o $@ -T $(TOP)/src/config/linuxbios_ram.ld linuxbios_ram.o"<br>
action "$(CROSS_COMPILE)nm -n linuxbios_ram | sort >
linuxbios_ram.map"<br>
end<br>
/*************************Patch***********************************************<br>
<br>
<pre wrap="">Signed-off-by: Marc Karasek <a class="moz-txt-link-freetext" href="mailto:marc.karasek@sun.com">mailto:marc.karasek@sun.com</a></pre>
<pre class="moz-signature" cols="72">/*********************
Marc Karasek
MTS
Sun Microsystems
<a class="moz-txt-link-freetext" href="mailto:marc.karasek@sun.com">mailto:marc.karasek@sun.com</a>
ph:770.360.6415
*********************/
</pre>
<br>
<br>
Carl-Daniel Hailfinger wrote:
<blockquote cite="mid:475467D7.9010504@gmx.net" type="cite">
<pre wrap="">On 03.12.2007 21:18, Marc Karasek wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I think I have found the problem. It is related to the patch Ed sent.
The new LD looks like it automagically turns on the --build-id
option. I have not found out how turn it off.
When this option is used it generates the .note.gnu.build-id
section. When this section was discarded in the first ld pass
(linuxbios_rom.ram creation) it was causing the segmentation fault crash.
It looks like this same option is being called again when crt0.o is
linked to create linuxbios. I have added the .note.gnu.build-id
section to the .id section in the ldscript.ld file.
SECTIONS {
. = (_ROMBASE + ROM_IMAGE_SIZE - 0x10) - (__id_end - __id_start);
.id (.) : {
*(.id)
*(.note.gnu.build-id)
}
This has gotten me past the second crash but now linuxbios.strip is
crashing.
</pre>
</blockquote>
<pre wrap=""><!---->
Well done.
</pre>
<blockquote type="cite">
<pre wrap="">nm -n linuxbios | sort > linuxbios.map
objcopy --gap-fill 0xff -O binary linuxbios linuxbios.strip
objcopy: linuxbios.strip: Bad value
objcopy: linuxbios.strip: Bad value
make[1]: *** [linuxbios.strip] Error 1
So this does not look like a ld problem, but an added feature to ld is
causing us grief. If anyone can figure out how to turn this option
off, that may fix all of this without any patches... :-)
</pre>
</blockquote>
<pre wrap=""><!---->
Still, it would be a nice gesture to the binutils guys to report it as a
bug. Maybe there's some bug deeper down which triggers this.
Regards,
Carl-Daniel
</pre>
</blockquote>
</body>
</html>