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

[Xen-devel] Re: [POWERPC/IA64] Updates required due to loader changes

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: [Xen-devel] Re: [POWERPC/IA64] Updates required due to loader changes
From: Horms <horms@xxxxxxxxxxxx>
Date: Fri, 25 Aug 2006 12:21:51 +0900 (JST)
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Delivery-date: Tue, 29 Aug 2006 02:00:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1156451388.24494.103.camel@xxxxxxxxxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: tin/1.8.2-20060425 ("Shillay") (UNIX) (Linux/2.6.17-2-686 (i686))
On Thu, 24 Aug 2006 15:29:48 -0500, Hollis Blanchard wrote:
> On Thu, 2006-08-24 at 14:16 -0600, Alex Williamson wrote:
>> 
>> diff -r d5eb5205ff35 tools/xcutils/readnotes.c
>> --- a/tools/xcutils/readnotes.c       Thu Aug 24 16:25:49 2006 +0100
>> +++ b/tools/xcutils/readnotes.c       Thu Aug 24 14:12:45 2006 -0600
>> @@ -22,7 +22,7 @@ typedef Elf32_Nhdr Elf_Nhdr;
>>  typedef Elf32_Nhdr Elf_Nhdr;
>>  typedef Elf32_Half Elf_Half;
>>  typedef Elf32_Word Elf_Word;
>> -#elif defined(__x86_64__)
>> +#elif defined(__x86_64__) || defined(__ia64__)
>>  typedef Elf64_Ehdr Elf_Ehdr;
>>  typedef Elf64_Nhdr Elf_Nhdr;
>>  typedef Elf64_Half Elf_Half;
> 
> Are we doing this again? Ian, please use ELFSIZE, as seen in the
> following files:
>        tools/libxc/xg_private.h
>        tools/libxc/xc_elf.h
>        tools/libxc/xc_load_elf.c
>        config/powerpc64.mk
> 

Is the patch below what you had in mind?

I'm a little unsure about where the definition of ELFSIZE comes from.
tools/libxc/xg_private.h seems to take pains to make sure it is defined,
but tools/libxc/xc_elf.h, tools/libxc/xc_load_elf.c (and
xen/include/xen/elf.h), do not seem to.

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

Use ELFSIZE in tools/xcutils/readnotes.c

Signed-Off-By: Simon Horman <horms@xxxxxxxxxxxx>

--- 0001/tools/xcutils/readnotes.c
+++ work/tools/xcutils/readnotes.c      2006-08-25 12:17:37.000000000 +0900
@@ -17,18 +17,16 @@
 #define ELFNOTE_DESC(_n_) (ELFNOTE_NAME(_n_) + (((_n_)->n_namesz+3)&~3))
 #define ELFNOTE_NEXT(_n_) (ELFNOTE_DESC(_n_) + (((_n_)->n_descsz+3)&~3))
 
-#if defined(__i386__)
+#if defined(ELFSIZE) && (ELFSIZE == 32)
 typedef Elf32_Ehdr Elf_Ehdr;
 typedef Elf32_Nhdr Elf_Nhdr;
 typedef Elf32_Half Elf_Half;
 typedef Elf32_Word Elf_Word;
-#elif defined(__x86_64__)
+#elif defined(ELFSIZE) && (ELFSIZE == 64)
 typedef Elf64_Ehdr Elf_Ehdr;
 typedef Elf64_Nhdr Elf_Nhdr;
 typedef Elf64_Half Elf_Half;
 typedef Elf64_Word Elf_Word;
-#else
-#error "Unknown architecture"
 #endif
 
 static void print_string_note(const char *prefix, Elf_Nhdr *note)


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

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