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] [linux-2.6.18-xen] Imported patch x86-elfnote-as-preproc

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Imported patch x86-elfnote-as-preprocessor-macro.patch from xen-unstable.hg 15200:bd3d6b4c52ec
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 02:22:59 -0700
Delivery-date: Mon, 11 Jun 2007 02:26:24 -0700
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 1180947924 -3600
# Node ID 3bf38ecef9001bf40ee6a43c4dbe4b463ed087f7
# Parent  50af4d15dfea05a3bcbec7bf77ad407663f69a48
Imported patch x86-elfnote-as-preprocessor-macro.patch from xen-unstable.hg 
15200:bd3d6b4c52ec
---
 include/linux/elfnote.h |   44 ++++++++++++++++++++++++++++++--------------
 1 files changed, 30 insertions(+), 14 deletions(-)

diff -r 50af4d15dfea -r 3bf38ecef900 include/linux/elfnote.h
--- a/include/linux/elfnote.h   Mon Jun 04 10:05:24 2007 +0100
+++ b/include/linux/elfnote.h   Mon Jun 04 10:05:24 2007 +0100
@@ -31,22 +31,38 @@
 /*
  * Generate a structure with the same shape as Elf{32,64}_Nhdr (which
  * turn out to be the same size and shape), followed by the name and
- * desc data with appropriate padding.  The 'desc' argument includes
- * the assembler pseudo op defining the type of the data: .asciz
- * "hello, world"
+ * desc data with appropriate padding.  The 'desctype' argument is the
+ * assembler pseudo op defining the type of the data e.g. .asciz while
+ * 'descdata' is the data itself e.g.  "hello, world".
+ *
+ * e.g. ELFNOTE(XYZCo, 42, .asciz, "forty-two")
+ *      ELFNOTE(XYZCo, 12, .long, 0xdeadbeef)
  */
-.macro ELFNOTE name type desc:vararg
-.pushsection ".note.\name"
-  .align 4
-  .long 2f - 1f                        /* namesz */
-  .long 4f - 3f                        /* descsz */
-  .long \type
-1:.asciz "\name"
-2:.align 4
-3:\desc
-4:.align 4
+#ifdef __STDC__
+#define ELFNOTE(name, type, desctype, descdata...) \
+.pushsection .note.name                        ;       \
+  .align 4                             ;       \
+  .long 2f - 1f                /* namesz */    ;       \
+  .long 4f - 3f                /* descsz */    ;       \
+  .long type                           ;       \
+1:.asciz #name                         ;       \
+2:.align 4                             ;       \
+3:desctype descdata                    ;       \
+4:.align 4                             ;       \
 .popsection
-.endm
+#else /* !__STDC__, i.e. -traditional */
+#define ELFNOTE(name, type, desctype, descdata) \
+.pushsection .note.name                        ;       \
+  .align 4                             ;       \
+  .long 2f - 1f                /* namesz */    ;       \
+  .long 4f - 3f                /* descsz */    ;       \
+  .long type                           ;       \
+1:.asciz "name"                                ;       \
+2:.align 4                             ;       \
+3:desctype descdata                    ;       \
+4:.align 4                             ;       \
+.popsection
+#endif /* __STDC__ */
 #else  /* !__ASSEMBLER__ */
 #include <linux/elf.h>
 /*

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Imported patch x86-elfnote-as-preprocessor-macro.patch from xen-unstable.hg 15200:bd3d6b4c52ec, Xen patchbot-linux-2.6.18-xen <=