Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K8evK-0008Mi-3V for mharc-grub-devel@gnu.org; Tue, 17 Jun 2008 13:24:50 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K8evF-0008LJ-TE for grub-devel@gnu.org; Tue, 17 Jun 2008 13:24:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K8evE-0008L5-EY for grub-devel@gnu.org; Tue, 17 Jun 2008 13:24:45 -0400 Received: from [199.232.76.173] (port=43972 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K8evE-0008Ky-7K for grub-devel@gnu.org; Tue, 17 Jun 2008 13:24:44 -0400 Received: from ti-out-0910.google.com ([209.85.142.186]:12690) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K8evD-0003Bw-PE for grub-devel@gnu.org; Tue, 17 Jun 2008 13:24:44 -0400 Received: by ti-out-0910.google.com with SMTP id u5so1871897tia.10 for ; Tue, 17 Jun 2008 10:24:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=yM3kz7ds15JOJ8CDqno3jGvF45IqYTUw3heRSItwTNE=; b=B1W6VlmD2Idss/NdLAx1mzHu/MY6hDuqMJRz47oF0hbQkSLRWiTR4xmos7eBpycGlV tByi7N6e50lpF/C0UxrpGwd3FPB0mUfKhx3Szx9ChdOkc/Epymn+FLfnyDiEJetan3hF 28m0q9W4jbFTI+hr86LWSyOvQiuV7aD7ThvZs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=Maili5KmCXiL9eLOXCGu9MhEvu+1wv+ZVA/U9W/O2f4ci+CwNli7vQ1kwjWdFzR4Wu 742x7Tb82+Bp4yCmWUMjmV5ylC/B12Icdt38qK5kQskMIaMSrz0J6rt/6Cud1Eo/VkoV 5SGoRhYIgG+8uxEs6bkfQqdhPlWXrize0KePQ= Received: by 10.110.46.3 with SMTP id t3mr5589231tit.30.1213723482152; Tue, 17 Jun 2008 10:24:42 -0700 (PDT) Received: by 10.110.16.5 with HTTP; Tue, 17 Jun 2008 10:24:42 -0700 (PDT) Message-ID: Date: Wed, 18 Jun 2008 01:24:42 +0800 From: Bean To: "The development of GRUB 2" In-Reply-To: <1213723080.20084.6.camel@dv> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080616103345.z8afx71pssscs4oo-cebfxv@webmail.spamcop.net> <20080617151708.GA7284@thorin> <1213716735.11567.6.camel@dv> <1213718105.11567.26.camel@dv> <1213723080.20084.6.camel@dv> X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] Move ELF program header X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jun 2008 17:24:46 -0000 On Wed, Jun 18, 2008 at 1:18 AM, Pavel Roskin wrote: > On Wed, 2008-06-18 at 00:02 +0800, Bean wrote: >> >> Are you using the native compiler, or cross compile from i386 ? It >> >> could have some effect. >> > >> > I'm compiling natively on PowerPC. >> >> It could be an endian problem. Check the elf header, see if the fields are ok. > > That's the headers, I don't see anything wrong. The sections are > missing, but it has always been like that. The version is current from > CVS. > > $ ./grub-mkimage -o grub.img -d . *.mod > $ objdump -x grub.img > > grub.img: file format elf32-powerpc > grub.img > architecture: powerpc:common, flags 0x00000102: > EXEC_P, D_PAGED > start address 0x00010000 > > Program Header: > LOAD off 0x000000c0 vaddr 0x00010000 paddr 0x00010000 align 2**4 > filesz 0x0000bf04 memsz 0x000133a8 flags rwx > LOAD off 0x0000bfc4 vaddr 0x100000b4 paddr 0x100000b4 align 2**2 > filesz 0x00000024 memsz 0x00000024 flags r-- > NOTE off 0x0000bfc4 vaddr 0x100000b4 paddr 0x100000b4 align 2**2 > filesz 0x00000024 memsz 0x00000024 flags r-- > STACK off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**2 > filesz 0x00000000 memsz 0x00000000 flags rwx > LOAD off 0x0000bfe8 vaddr 0x10009000 paddr 0x10009000 align 2**2 > filesz 0x00052104 memsz 0x00052104 flags rwx > > Sections: > Idx Name Size VMA LMA File off Algn > SYMBOL TABLE: > no symbols > > > The image loads, complains about "cursor-on", shows "Welcome to GRUB" > and the prompt. "lsmod" shows an empty list. Hi, You can also add some printf in kern/elf.c to see if grub can parse it properly, for example, grub_elf_check_header is a common place where problem occurs. -- Bean