* [Qemu-devel] building openbios-qemu.elf?
@ 2009-02-23 19:52 Hollis Blanchard
2009-02-23 23:07 ` [Qemu-devel] Re: [OpenBIOS] " Laurent Vivier
2009-02-24 20:23 ` [Qemu-devel] " Blue Swirl
0 siblings, 2 replies; 8+ messages in thread
From: Hollis Blanchard @ 2009-02-23 19:52 UTC (permalink / raw)
To: openbios; +Cc: qemu-devel
Hi, I just tried to build openbios-qemu.elf, but it is a little too big
(1MB + 4 bytes):
Elf file type is EXEC (Executable file)
Entry point 0xfff08000
There are 3 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000094 0xfff00000 0xfff00000 0x100000 0x100000 RWE 0x4
LOAD 0x100094 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Section to Segment mapping:
Segment Sections...
00 .text.vectors .text .rodata .data .sdata .bss .sbss
01 .romentry
02
In contrast, the openbios-ppc binary in qemu looks like this:
Elf file type is EXEC (Executable file)
Entry point 0xfff08000
There are 2 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000074 0xfff00000 0xfff00000 0x41044 0x4bc44 RWE 0x4
LOAD 0x0410b8 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
Section to Segment mapping:
Segment Sections...
00 .text.vectors .text .rodata .data .sdata .bss .sbss.1 .sbss.2 .sbss.3 .sbss.4 .sbss.5 .sbss.6 .sbss.7 .sbss.8
01 .romentry
I'm building with gcc 4.2.3. Any ideas?
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] Re: [OpenBIOS] building openbios-qemu.elf?
2009-02-23 19:52 [Qemu-devel] building openbios-qemu.elf? Hollis Blanchard
@ 2009-02-23 23:07 ` Laurent Vivier
2009-02-24 16:09 ` Hollis Blanchard
2009-02-24 20:23 ` [Qemu-devel] " Blue Swirl
1 sibling, 1 reply; 8+ messages in thread
From: Laurent Vivier @ 2009-02-23 23:07 UTC (permalink / raw)
To: The OpenBIOS Mailinglist; +Cc: qemu-devel
Hi,
Do you use source from SVN head ?
Do you have any information in obj-ppc/build.log ?
I use gcc-4.3.2 on my powerPC G4, powerpc-linux-gnu-gcc-4.2.4 on intel
T5500 and size is fine.
Regards,
Laurent
Le 23 févr. 09 à 20:52, Hollis Blanchard a écrit :
> Hi, I just tried to build openbios-qemu.elf, but it is a little too
> big
> (1MB + 4 bytes):
>
> Elf file type is EXEC (Executable file)
> Entry point 0xfff08000
> There are 3 program headers, starting at offset 52
>
> Program Headers:
> Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg
> Align
> LOAD 0x000094 0xfff00000 0xfff00000 0x100000 0x100000 RWE
> 0x4
> LOAD 0x100094 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
> GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
>
> Section to Segment mapping:
> Segment Sections...
> 00 .text.vectors .text .rodata .data .sdata .bss .sbss
> 01 .romentry
> 02
>
> In contrast, the openbios-ppc binary in qemu looks like this:
>
> Elf file type is EXEC (Executable file)
> Entry point 0xfff08000
> There are 2 program headers, starting at offset 52
>
> Program Headers:
> Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg
> Align
> LOAD 0x000074 0xfff00000 0xfff00000 0x41044 0x4bc44 RWE 0x4
> LOAD 0x0410b8 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
>
> Section to Segment mapping:
> Segment Sections...
> 00 .text.vectors .text .rodata .data .sdata .bss .sbss.1 .sbss.
> 2 .sbss.3 .sbss.4 .sbss.5 .sbss.6 .sbss.7 .sbss.8
> 01 .romentry
>
> I'm building with gcc 4.2.3. Any ideas?
>
> --
> Hollis Blanchard
> IBM Linux Technology Center
>
>
> --
> OpenBIOS http://openbios.org/
> Mailinglist: http://lists.openbios.org/mailman/listinfo
> Free your System - May the Forth be with you
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] Re: [OpenBIOS] building openbios-qemu.elf?
2009-02-23 23:07 ` [Qemu-devel] Re: [OpenBIOS] " Laurent Vivier
@ 2009-02-24 16:09 ` Hollis Blanchard
0 siblings, 0 replies; 8+ messages in thread
From: Hollis Blanchard @ 2009-02-24 16:09 UTC (permalink / raw)
To: qemu-devel; +Cc: The OpenBIOS Mailinglist
On Tue, 2009-02-24 at 00:07 +0100, Laurent Vivier wrote:
> Hi,
>
> Do you use source from SVN head ?
Yes.
> Do you have any information in obj-ppc/build.log ?
This is somewhat interesting:
powerpc-440-linux-gnu-strip openbios-qemu.elf
BFD: st4PszLi: warning: allocated section `.bss' not in segment
BFD: st4PszLi: warning: allocated section `.sbss' not in segment
The "nostrip" version of openbios-qemu.elf looks much better:
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000094 0xfff00000 0xfff00000 0x42044 0x4bcb4 RWE 0x4
LOAD 0x0420d8 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Section to Segment mapping:
Segment Sections...
00 .text.vectors .text .rodata .data .sdata
01 .romentry
02
So something goes wrong in the strip process.
--
Hollis Blanchard
IBM Linux Technology Center
> I use gcc-4.3.2 on my powerPC G4, powerpc-linux-gnu-gcc-4.2.4 on intel
> T5500 and size is fine.
>
> Regards,
> Laurent
>
> Le 23 févr. 09 à 20:52, Hollis Blanchard a écrit :
>
> > Hi, I just tried to build openbios-qemu.elf, but it is a little too
> > big
> > (1MB + 4 bytes):
> >
> > Elf file type is EXEC (Executable file)
> > Entry point 0xfff08000
> > There are 3 program headers, starting at offset 52
> >
> > Program Headers:
> > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg
> > Align
> > LOAD 0x000094 0xfff00000 0xfff00000 0x100000 0x100000 RWE
> > 0x4
> > LOAD 0x100094 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
> > GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
> >
> > Section to Segment mapping:
> > Segment Sections...
> > 00 .text.vectors .text .rodata .data .sdata .bss .sbss
> > 01 .romentry
> > 02
> >
> > In contrast, the openbios-ppc binary in qemu looks like this:
> >
> > Elf file type is EXEC (Executable file)
> > Entry point 0xfff08000
> > There are 2 program headers, starting at offset 52
> >
> > Program Headers:
> > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg
> > Align
> > LOAD 0x000074 0xfff00000 0xfff00000 0x41044 0x4bc44 RWE 0x4
> > LOAD 0x0410b8 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
> >
> > Section to Segment mapping:
> > Segment Sections...
> > 00 .text.vectors .text .rodata .data .sdata .bss .sbss.1 .sbss.
> > 2 .sbss.3 .sbss.4 .sbss.5 .sbss.6 .sbss.7 .sbss.8
> > 01 .romentry
> >
> > I'm building with gcc 4.2.3. Any ideas?
> >
> > --
> > Hollis Blanchard
> > IBM Linux Technology Center
> >
> >
> > --
> > OpenBIOS http://openbios.org/
> > Mailinglist: http://lists.openbios.org/mailman/listinfo
> > Free your System - May the Forth be with you
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] building openbios-qemu.elf?
2009-02-23 19:52 [Qemu-devel] building openbios-qemu.elf? Hollis Blanchard
2009-02-23 23:07 ` [Qemu-devel] Re: [OpenBIOS] " Laurent Vivier
@ 2009-02-24 20:23 ` Blue Swirl
2009-02-24 20:27 ` Blue Swirl
1 sibling, 1 reply; 8+ messages in thread
From: Blue Swirl @ 2009-02-24 20:23 UTC (permalink / raw)
To: qemu-devel; +Cc: openbios
On 2/23/09, Hollis Blanchard <hollisb@us.ibm.com> wrote:
> Hi, I just tried to build openbios-qemu.elf, but it is a little too big
> (1MB + 4 bytes):
>
> Elf file type is EXEC (Executable file)
> Entry point 0xfff08000
> There are 3 program headers, starting at offset 52
>
> Program Headers:
> Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
> LOAD 0x000094 0xfff00000 0xfff00000 0x100000 0x100000 RWE 0x4
> LOAD 0x100094 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
> GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
>
> Section to Segment mapping:
> Segment Sections...
> 00 .text.vectors .text .rodata .data .sdata .bss .sbss
> 01 .romentry
> 02
>
> In contrast, the openbios-ppc binary in qemu looks like this:
>
> Elf file type is EXEC (Executable file)
> Entry point 0xfff08000
> There are 2 program headers, starting at offset 52
>
> Program Headers:
> Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
> LOAD 0x000074 0xfff00000 0xfff00000 0x41044 0x4bc44 RWE 0x4
> LOAD 0x0410b8 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
>
> Section to Segment mapping:
> Segment Sections...
> 00 .text.vectors .text .rodata .data .sdata .bss .sbss.1 .sbss.2 .sbss.3 .sbss.4 .sbss.5 .sbss.6 .sbss.7 .sbss.8
> 01 .romentry
>
> I'm building with gcc 4.2.3. Any ideas?
The ldscript does not handle sdata and sbss.*?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] building openbios-qemu.elf?
2009-02-24 20:23 ` [Qemu-devel] " Blue Swirl
@ 2009-02-24 20:27 ` Blue Swirl
2009-02-25 21:03 ` Hollis Blanchard
0 siblings, 1 reply; 8+ messages in thread
From: Blue Swirl @ 2009-02-24 20:27 UTC (permalink / raw)
To: qemu-devel; +Cc: openbios
[-- Attachment #1: Type: text/plain, Size: 1686 bytes --]
On 2/24/09, Blue Swirl <blauwirbel@gmail.com> wrote:
> On 2/23/09, Hollis Blanchard <hollisb@us.ibm.com> wrote:
> > Hi, I just tried to build openbios-qemu.elf, but it is a little too big
> > (1MB + 4 bytes):
> >
> > Elf file type is EXEC (Executable file)
> > Entry point 0xfff08000
> > There are 3 program headers, starting at offset 52
> >
> > Program Headers:
> > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
> > LOAD 0x000094 0xfff00000 0xfff00000 0x100000 0x100000 RWE 0x4
> > LOAD 0x100094 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
> > GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
> >
> > Section to Segment mapping:
> > Segment Sections...
> > 00 .text.vectors .text .rodata .data .sdata .bss .sbss
> > 01 .romentry
> > 02
> >
> > In contrast, the openbios-ppc binary in qemu looks like this:
> >
> > Elf file type is EXEC (Executable file)
> > Entry point 0xfff08000
> > There are 2 program headers, starting at offset 52
> >
> > Program Headers:
> > Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
> > LOAD 0x000074 0xfff00000 0xfff00000 0x41044 0x4bc44 RWE 0x4
> > LOAD 0x0410b8 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
> >
> > Section to Segment mapping:
> > Segment Sections...
> > 00 .text.vectors .text .rodata .data .sdata .bss .sbss.1 .sbss.2 .sbss.3 .sbss.4 .sbss.5 .sbss.6 .sbss.7 .sbss.8
> > 01 .romentry
> >
> > I'm building with gcc 4.2.3. Any ideas?
>
>
> The ldscript does not handle sdata and sbss.*?
Would this patch fix the problem?
[-- Attachment #2: fix_ldscript.diff --]
[-- Type: plain/text, Size: 496 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] building openbios-qemu.elf?
2009-02-24 20:27 ` Blue Swirl
@ 2009-02-25 21:03 ` Hollis Blanchard
2009-02-25 22:09 ` Laurent Vivier
2009-02-26 7:35 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 2 replies; 8+ messages in thread
From: Hollis Blanchard @ 2009-02-25 21:03 UTC (permalink / raw)
To: qemu-devel; +Cc: openbios
On Tue, 2009-02-24 at 22:27 +0200, Blue Swirl wrote:
>
> Would this patch fix the problem?
Doesn't look like it. After patching and make clean, I see the same
warning from strip, and basically the same output:
# tail obj-ppc/build.log
[...]
powerpc-440-linux-gnu-ld --warn-common -N -T ../arch/ppc/qemu/ldscript target/arch/ppc/qemu/start.o target/arch/ppc/timebase.o libqemu.a libbootstrap.a libdrivers.a libmodules.a liblibc.a libfs.a libgcc.a -o openbios-qemu.elf
powerpc-440-linux-gnu-nm openbios-qemu.elf | sort > ./openbios-qemu.syms
cp openbios-qemu.elf openbios-qemu.elf.nostrip
powerpc-440-linux-gnu-strip openbios-qemu.elf
BFD: stzD2J6q: warning: allocated section `.bss' not in segment
BFD: stzD2J6q: warning: allocated section `.sbss' not in segment
# readelf -l obj-ppc/openbios-qemu.elf*
File: obj-ppc/openbios-qemu.elf
Elf file type is EXEC (Executable file)
Entry point 0xfff08000
There are 3 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000094 0xfff00000 0xfff00000 0x100000 0x100000 RWE 0x4
LOAD 0x100094 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Section to Segment mapping:
Segment Sections...
00 .text.vectors .text .rodata .data .bss .sbss
01 .romentry
02
File: obj-ppc/openbios-qemu.elf.nostrip
Elf file type is EXEC (Executable file)
Entry point 0xfff08000
There are 3 program headers, starting at offset 52
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000094 0xfff00000 0xfff00000 0x42044 0x4bcb4 RWE 0x4
LOAD 0x0420d8 0xfffffffc 0xfffffffc 0x00004 0x00004 R E 0x1
GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
Section to Segment mapping:
Segment Sections...
00 .text.vectors .text .rodata .data
01 .romentry
02
--
Hollis Blanchard
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] building openbios-qemu.elf?
2009-02-25 21:03 ` Hollis Blanchard
@ 2009-02-25 22:09 ` Laurent Vivier
2009-02-26 7:35 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 0 replies; 8+ messages in thread
From: Laurent Vivier @ 2009-02-25 22:09 UTC (permalink / raw)
To: qemu-devel; +Cc: openbios
Le 25 févr. 09 à 22:03, Hollis Blanchard a écrit :
> On Tue, 2009-02-24 at 22:27 +0200, Blue Swirl wrote:
>>
>> Would this patch fix the problem?
>
> Doesn't look like it. After patching and make clean, I see the same
> warning from strip, and basically the same output:
I think you should try binutils 2.18...
Regards,
Laurent
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] building openbios-qemu.elf?
2009-02-25 21:03 ` Hollis Blanchard
2009-02-25 22:09 ` Laurent Vivier
@ 2009-02-26 7:35 ` Jean-Christophe PLAGNIOL-VILLARD
1 sibling, 0 replies; 8+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2009-02-26 7:35 UTC (permalink / raw)
To: Hollis Blanchard; +Cc: openbios, qemu-devel
On 15:03 Wed 25 Feb , Hollis Blanchard wrote:
> On Tue, 2009-02-24 at 22:27 +0200, Blue Swirl wrote:
> >
> > Would this patch fix the problem?
>
> Doesn't look like it. After patching and make clean, I see the same
> warning from strip, and basically the same output:
>
> # tail obj-ppc/build.log
> [...]
> powerpc-440-linux-gnu-ld --warn-common -N -T ../arch/ppc/qemu/ldscript target/arch/ppc/qemu/start.o target/arch/ppc/timebase.o libqemu.a libbootstrap.a libdrivers.a libmodules.a liblibc.a libfs.a libgcc.a -o openbios-qemu.elf
> powerpc-440-linux-gnu-nm openbios-qemu.elf | sort > ./openbios-qemu.syms
> cp openbios-qemu.elf openbios-qemu.elf.nostrip
> powerpc-440-linux-gnu-strip openbios-qemu.elf
> BFD: stzD2J6q: warning: allocated section `.bss' not in segment
> BFD: stzD2J6q: warning: allocated section `.sbss' not in segment
I've already this on u-boot too
it's binutils bug sorry I do not remerber which one but if you update it it
will work. Personnaly I use now GNU ld (GNU Binutils) 2.18.90.20080910
Best Regards,
J.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-02-26 8:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 19:52 [Qemu-devel] building openbios-qemu.elf? Hollis Blanchard
2009-02-23 23:07 ` [Qemu-devel] Re: [OpenBIOS] " Laurent Vivier
2009-02-24 16:09 ` Hollis Blanchard
2009-02-24 20:23 ` [Qemu-devel] " Blue Swirl
2009-02-24 20:27 ` Blue Swirl
2009-02-25 21:03 ` Hollis Blanchard
2009-02-25 22:09 ` Laurent Vivier
2009-02-26 7:35 ` Jean-Christophe PLAGNIOL-VILLARD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).