From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 10670 invoked from network); 28 May 1999 23:00:44 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 28 May 1999 23:00:44 -0000 Received: from piglet.twiddle.net (root@piglet.twiddle.net [207.104.6.26]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id SAA31831 for ; Fri, 28 May 1999 18:17:33 -0400 Received: (from rth@localhost) by piglet.twiddle.net (8.8.7/8.8.7) id PAA00797; Fri, 28 May 1999 15:17:32 -0700 Message-ID: <19990528151732.A619@twiddle.net> Date: Fri, 28 May 1999 15:17:32 -0700 From: Richard Henderson To: axp-list@redhat.com, "'glibc-linux@ricardo.ecn.wfu.edu'" Subject: Re: Virtual address value in ELF file format... References: <73F63B52E3A7D111B20900A0C96C0FD776EFFC@kh_exchange1> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2 In-Reply-To: <73F63B52E3A7D111B20900A0C96C0FD776EFFC@kh_exchange1>; from Hyung Min SEO on Thu, May 27, 1999 at 07:12:25PM +0900 On Thu, May 27, 1999 at 07:12:25PM +0900, Hyung Min SEO wrote: > How can I set the p_vaddr value in some ELF file? With a linker script laying out the sections. > And how can I get the virtual address for any physical address? You can't in general. What are you really asking? > If I want the ELF file to load at physical address 0x416000, how can I get > virtual address? I presume you are tring to do MILO-ish sort of loading things? In which case you know the mapping from virtual to physical in that environment and arrange things appropriately. There is a provision for setting separate virtual and physical load points, but this is only useful for writing ROMs. See http://www.cygnus.com/pubs/gnupro/5_ut/b_Usingld/ldLinker_scripts.html for a good explanation of how to use linker scripts. r~