WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Guest image and symtable alignement

To: Mathieu Ropert <mro@xxxxxxxxxx>
Subject: Re: [Xen-devel] Guest image and symtable alignement
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 13 Apr 2006 10:18:07 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 13 Apr 2006 02:17:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <443BABCB.6000900@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <443BABCB.6000900@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 11 Apr 2006, at 14:14, Mathieu Ropert wrote:

I found a difference between Xen's domain kernel symbol table alignement and alignement found in some other OS, like BSD.

On Xen (looking at loadelfsymtab() in common/elf.c), symtable length is stored on an ELFROUND rounded address (4 bytes on 32bits, 8 bytes on 64 bits) followed by the ELF header. As length is an int, header isn't 8 bytes aligned on 64 bits (no problem on 32 bit as sizeof (int) == ELFROUND), whereas OS like BSD expects the header to be aligned on a long boundary.

I'd like to know whichever is right (if there is any standard about that), because this may cause some incompatibilty problems with future ports attempts. Was also wondering if we could just fix it be moving all this 4 bytes forward in the guest OS code (may break pointer references, if any?).

That code is used *only* by BSD ports. So I guess it does work for them and, since the build of the OS will be targetted at Xen they can always do whatever is needed to get their symtab to be accepted by the loadelfsymtab() code. If there is a problem, it'll be up to them to submit a patch to fix it.

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>