From owner-freebsd-embedded@FreeBSD.ORG Mon Oct 13 18:58:24 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88C5E106569A for ; Mon, 13 Oct 2008 18:58:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 496BE8FC08 for ; Mon, 13 Oct 2008 18:58:24 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9DItlrR044167; Mon, 13 Oct 2008 12:55:47 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 13 Oct 2008 12:56:48 -0600 (MDT) Message-Id: <20081013.125648.1239212699.imp@bsdimp.com> To: bms@incunabulum.net From: "M. Warner Losh" In-Reply-To: <48F39798.3010606@incunabulum.net> References: <48F39798.3010606@incunabulum.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@FreeBSD.org Subject: Re: ELF loader problem with CFE on ASUS WL500g X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Oct 2008 18:58:24 -0000 In message: <48F39798.3010606@incunabulum.net> Bruce M Simpson writes: : Hi, : : I just tried to boot the WGT634U kernel on the ASUS WL500g. : : CFE version is 1.0.37. : : It appears there's yet another problem with the ELF loader there -- it : now looks at the p_paddr field. As this is out of range for physical : memory (GNU ld set it the same as p_vaddr), it balks. I thought you could fix this with linker script tweaks... : Any suggestions for workarounds? I tried using the GNU ld "MEMORY" : directive, however, it seems to munge p_vaddr also. bummer... It sounds a bit like we need to do the normal tricks of 'early' boot loaders: turn on the mmu and then jump to . to transition from PA to VA addresses... : It looks like objcopy's --change-section-lma option, with a negative : offset, would do what I want, however it will need to be scripted to : work on named sections. You might try to mock-up a test with a newer version of binutils than 2.15 we're using? Warner