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-changelog

[Xen-changelog] [xen-unstable] [XEN] Consolidate multiple defintions of

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Consolidate multiple defintions of ELFNOTE_* accessor macros
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 22 Jan 2007 11:00:16 -0800
Delivery-date: Mon, 22 Jan 2007 11:00:23 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
# Date 1169480412 0
# Node ID d86a96ca47a307532c17deaa875f07eda81b2c3f
# Parent  de6c4f72b65bf0bb06adc458ae223285c92241d9
[XEN] Consolidate multiple defintions of ELFNOTE_* accessor macros

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 xen/common/elf.c      |   10 ++--------
 xen/common/kexec.c    |    5 -----
 xen/include/xen/elf.h |    5 +++++
 3 files changed, 7 insertions(+), 13 deletions(-)

diff -r de6c4f72b65b -r d86a96ca47a3 xen/common/elf.c
--- a/xen/common/elf.c  Mon Jan 22 15:31:27 2007 +0000
+++ b/xen/common/elf.c  Mon Jan 22 15:40:12 2007 +0000
@@ -99,12 +99,6 @@ static unsigned long long xen_guest_nume
     return value;
 }
 
-/*
- * Interface to the Xen ELF notes.
- */
-#define ELFNOTE_NAME(_n_)   ((const char*)(_n_) + sizeof(*(_n_)))
-#define ELFNOTE_DESC(_n_)   (ELFNOTE_NAME(_n_) + (((_n_)->namesz+3)&~3))
-#define ELFNOTE_NEXT(_n_)   (ELFNOTE_DESC(_n_) + (((_n_)->descsz+3)&~3))
 
 static int is_xen_elfnote_section(const char *image, const Elf_Shdr *shdr)
 {
@@ -115,7 +109,7 @@ static int is_xen_elfnote_section(const 
 
     for ( note = (const Elf_Note *)(image + shdr->sh_offset);
           note < (const Elf_Note *)(image + shdr->sh_offset + shdr->sh_size);
-          note = (const Elf_Note *)ELFNOTE_NEXT(note) )
+          note = ELFNOTE_NEXT(note) )
     {
         if ( !strncmp(ELFNOTE_NAME(note), "Xen", 4) )
             return 1;
@@ -134,7 +128,7 @@ static const Elf_Note *xen_elfnote_looku
 
     for ( note = (const Elf_Note *)dsi->__elfnote_section;
           note < (const Elf_Note *)dsi->__elfnote_section_end;
-          note = (const Elf_Note *)ELFNOTE_NEXT(note) )
+          note = ELFNOTE_NEXT(note) )
     {
         if ( strncmp(ELFNOTE_NAME(note), "Xen", 4) )
             continue;
diff -r de6c4f72b65b -r d86a96ca47a3 xen/common/kexec.c
--- a/xen/common/kexec.c        Mon Jan 22 15:31:27 2007 +0000
+++ b/xen/common/kexec.c        Mon Jan 22 15:40:12 2007 +0000
@@ -26,11 +26,6 @@
 
 typedef long ret_t;
 
-#define ELFNOTE_ALIGN(_n_) (((_n_)+3)&~3)
-#define ELFNOTE_NAME(_n_) ((char*)(_n_) + sizeof(*(_n_)))
-#define ELFNOTE_DESC(_n_) (ELFNOTE_NAME(_n_) + ELFNOTE_ALIGN((_n_)->namesz))
-#define ELFNOTE_NEXT(_n_) ((Elf_Note *)(ELFNOTE_DESC(_n_) + 
ELFNOTE_ALIGN((_n_)->descsz)))
-
 static DEFINE_PER_CPU(void *, crash_notes);
 
 static Elf_Note *xen_crash_note;
diff -r de6c4f72b65b -r d86a96ca47a3 xen/include/xen/elf.h
--- a/xen/include/xen/elf.h     Mon Jan 22 15:31:27 2007 +0000
+++ b/xen/include/xen/elf.h     Mon Jan 22 15:40:12 2007 +0000
@@ -517,6 +517,11 @@ typedef struct {
 #define AuxInfo                Aux64Info
 #endif
 
+#define ELFNOTE_ALIGN(_n_) (((_n_)+3)&~3)
+#define ELFNOTE_NAME(_n_) ((char*)(_n_) + sizeof(*(_n_)))
+#define ELFNOTE_DESC(_n_) (ELFNOTE_NAME(_n_) + ELFNOTE_ALIGN((_n_)->namesz))
+#define ELFNOTE_NEXT(_n_) ((Elf_Note *)(ELFNOTE_DESC(_n_) + 
ELFNOTE_ALIGN((_n_)->descsz)))
+
 struct domain_setup_info;
 extern int loadelfimage(struct domain_setup_info *);
 extern int parseelfimage(struct domain_setup_info *);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Consolidate multiple defintions of ELFNOTE_* accessor macros, Xen patchbot-unstable <=