From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH][ELF] Correct space calculation for symtab when BSD_SYMTAB=yes Date: Thu, 02 Aug 2007 14:21:34 +0100 Message-ID: References: <200708021426.59206.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200708021426.59206.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 2/8/07 13:26, "Christoph Egger" wrote: >> What do the virtual addresses of the symtab/strtab sections have to >> do with their location in the final address space, after loading? And since >> you pack the sections into the domain address space in >> elf_xen_dom_load_binary(), should you not simply sum the sizes of the >> sections, then sstart=virt_kend and send=sstart+size_sum, rather than >> taking max(end addresses in elf image) minus min(start addresses in elf >> image). > > You're right. Attached is a patch, which does it that way. Please try changeset 15679 in the -unstable staging tree. It's less code and also fixed up to work with the domU domain builder too. Except it's not actually been tested with a bsd_symtab guest kernel. It shouldn't need more than a few lines of fixing to get it working though, if that. -- Keir