Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HeZqK-0007oy-CN for qemu-devel@nongnu.org; Thu, 19 Apr 2007 12:50:48 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HeZqH-0007om-TF for qemu-devel@nongnu.org; Thu, 19 Apr 2007 12:50:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HeZqH-0007oj-O5 for qemu-devel@nongnu.org; Thu, 19 Apr 2007 12:50:45 -0400 Received: from zimbra.mindcentric.com ([216.98.159.230] helo=zimbra1.mindcentric.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HeZlJ-0005EG-4f for qemu-devel@nongnu.org; Thu, 19 Apr 2007 12:45:37 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by zimbra1.mindcentric.com (Postfix) with ESMTP id 779D6CBD4230 for ; Thu, 19 Apr 2007 09:48:37 -0700 (PDT) Received: from zimbra1.mindcentric.com ([127.0.0.1]) by localhost (zimbra1.mindcentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jXphVel5GblV for ; Thu, 19 Apr 2007 09:48:23 -0700 (PDT) Received: from 425host226.starwoodbroadband.com (425host226.starwoodbroadband.com [12.154.239.226]) by zimbra1.mindcentric.com (Postfix) with ESMTP id 3D503317C088 for ; Thu, 19 Apr 2007 09:16:06 -0700 (PDT) From: Ed Swierk Date: Thu, 19 Apr 2007 09:12:32 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704190912.32588.eswierk@arastra.com> Subject: [Qemu-devel] Building OpenHackWare (qemu-system-ppc firmware) 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 I'm having trouble building OpenHackWare (the firmware for qemu-system-ppc) from source on a PPC machine running Fedora 6, using either gcc 4.1.1 or gcc 3.4.6. I'm using the source tarball http://perso.magic.fr/l_indien/OpenHackWare/0.4/OpenHackWare-0.4.1.tar.bz2, with the patch pc-bios/ohw.diff from qemu-snapshot-2007-02-09_05.tar.bz2. The code compiles just fine (although gcc 4.1.1 generates a lot of warnings), but fails to link: ld -O2 -g -nostdlib -T src/main.ld -o .objs/main.out .objs/main.o .objs/bootinfos.o .objs/bloc.o .objs/pci.o .objs/of. \ o .objs/start.o .objs/nvram.o .objs/vga.o .objs/mm.o .objs/char.o .objs/malloc.o .objs/errno.o .objs/_vprintf.o .objs/\ printf.o .objs/sprintf.o .objs/snprintf.o .objs/vprintf.o .objs/vsprintf.o .objs/vsnprintf.o .objs/dprintf.o .objs/vdp\ rintf.o .objs/memcpy.o .objs/memccpy.o .objs/mempcpy.o .objs/memmove.o .objs/memcmove.o .objs/mempmove.o .objs/memset. \ o .objs/memcmp.o .objs/memchr.o .objs/rawmemchr.o .objs/memrchr.o .objs/memmem.o .objs/strcpy.o .objs/strdup.o .objs/s\ trndup.o .objs/stpcpy.o .objs/stpncpy.o .objs/strcat.o .objs/strncat.o .objs/strcmp.o .objs/strcasecmp.o .objs/strncmp\ .o .objs/strncasecmp.o .objs/strchr.o .objs/strchrnul.o .objs/strrchr.o .objs/basename.o .objs/dirname.o .objs/strlen. \ o .objs/strnlen.o .objs/exec_core.o .objs/exec_elf.o .objs/exec_xcoff.o .objs/exec_macho.o .objs/exec_chrp.o .objs/exe\ c_prep.o .objs/exec_pef.o .objs/fs_core.o .objs/fs_raw.o .objs/fs_ext2.o .objs/fs_isofs.o .objs/fs_hfs.o .objs/part_co\ re.o .objs/part_apple.o .objs/part_isofs.o .objs/part_prep.o .objs/dev_char_pckbd.o .objs/dev_char_kbdadb.o .objs/dev_\ char_kbd.o ld: region start is full (.objs/main.out section .rodata.str1.4) ld: region start is full (.objs/main.out section .rodata.str1.4) ld: section .text [0000000005800400 -> 0000000005813767] overlaps section .rodata.str1.4 [0000000005800054 -> 00000000\ 05804683] ld: .objs/main.out: section .text lma 0x5800400 overlaps previous sections ld: .objs/main.out: section .OpenFirmware lma 0x5813768 overlaps previous sections ld: .objs/main.out: section .data lma 0x581946c overlaps previous sections ld: .objs/main.out: section .OpenFirmware_vars lma 0x582053c overlaps previous sections ld: .objs/main.out: section .sdata lma 0x5821a4c overlaps previous sections ld: .objs/main.out: section .rodata lma 0x5821a5c overlaps previous sections ld: .objs/main.out: section .RTAS lma 0x5822654 overlaps previous sections ld: .objs/main.out: section .RTAS_vars lma 0x5823c10 overlaps previous sections make: *** [.objs/main.out] Error 1 I thought debug symbols might be making the code too big, but the same error occurs when compiling without -g. The only thing that seems to work is increasing the length of the start section in main.ld, and moving the bios section's origin to compensate. Unfortunately the resulting binary hangs; the OS presumably relies on the bios origin being 0x05800400. Any hints would be appreciated. --Ed