[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Guest image and symtable alignement


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Mathieu Ropert <mro@xxxxxxxxxx>
  • Date: Tue, 11 Apr 2006 15:14:51 +0200
  • Delivery-date: Wed, 12 Apr 2006 03:45:45 -0700
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hi,

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?).

Thanks,
Mathieu

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.