|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Re: [POWERPC/IA64] Updates required due to loader changes
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
|
|
|
|
|