From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lc3sE-0000Xm-Na for qemu-devel@nongnu.org; Tue, 24 Feb 2009 15:27:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lc3sD-0000Wl-58 for qemu-devel@nongnu.org; Tue, 24 Feb 2009 15:27:26 -0500 Received: from [199.232.76.173] (port=55654 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lc3sC-0000Wg-Rn for qemu-devel@nongnu.org; Tue, 24 Feb 2009 15:27:24 -0500 Received: from mail-bw0-f157.google.com ([209.85.218.157]:34573) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lc3sC-0003j8-E4 for qemu-devel@nongnu.org; Tue, 24 Feb 2009 15:27:24 -0500 Received: by bwz1 with SMTP id 1so6008027bwz.10 for ; Tue, 24 Feb 2009 12:27:22 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1235418752.28539.19.camel@slate.austin.ibm.com> Date: Tue, 24 Feb 2009 22:27:18 +0200 Message-ID: Subject: Re: [Qemu-devel] building openbios-qemu.elf? From: Blue Swirl Content-Type: multipart/mixed; boundary=001636c5ac7a0fa8d20463aff284 Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: openbios@openbios.org --001636c5ac7a0fa8d20463aff284 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/24/09, Blue Swirl wrote: > On 2/23/09, Hollis Blanchard 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? --001636c5ac7a0fa8d20463aff284 Content-Type: plain/text; name="fix_ldscript.diff" Content-Disposition: attachment; filename="fix_ldscript.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_frl13gzw SW5kZXg6IG9wZW5iaW9zLXF1aWx0L2FyY2gvcHBjL3FlbXUvbGRzY3JpcHQKPT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQot LS0gb3BlbmJpb3MtcXVpbHQub3JpZy9hcmNoL3BwYy9xZW11L2xkc2NyaXB0CTIwMDktMDItMjQg MjA6MjQ6NDIuMDAwMDAwMDAwICswMDAwCisrKyBvcGVuYmlvcy1xdWlsdC9hcmNoL3BwYy9xZW11 L2xkc2NyaXB0CTIwMDktMDItMjQgMjA6MjU6NDAuMDAwMDAwMDAwICswMDAwCkBAIC00MSw2ICs0 MSw3IEBACiAgICAgICAgIF9kYXRhID0gLjsKICAgICAgICAgKiguZGF0YSkKICAgICAgICAgKigu ZGF0YS4qKQorICAgICAgICAqKC5zZGF0YSkKIAlfZWRhdGEgPSAuOwogICAgIH0KIApAQCAtNDgs NiArNDksNyBAQAogICAgICAgICBfYnNzID0gLjsKIAkqKC5ic3MpCiAJKiguYnNzLiopCisJKigu c2Jzcy4qKQogCSooQ09NTU9OKQogCV9lYnNzID0gLjsKICAgICB9Cg== --001636c5ac7a0fa8d20463aff284--