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] [LINUX] Define ELFNOTE as a preprocessor

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [LINUX] Define ELFNOTE as a preprocessor macro rather than an assembler macro
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Aug 2006 19:00:33 +0000
Delivery-date: Wed, 23 Aug 2006 12:00:44 -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>
# Node ID 62b7b5f3029f37413b4d521ad896137ce88434de
# Parent  0bb18319b8a0ee957ea9307ac3d9e40c31b456d4
[LINUX] Define ELFNOTE as a preprocessor macro rather than an assembler macro

Assembler .macros have various issues with string arguments and :varargs.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxxxxx>
---
 patches/linux-2.6.16.13/series                                  |    1 
 patches/linux-2.6.16.13/x86-elfnote-as-preprocessor-macro.patch |   26 
++++++++++
 2 files changed, 27 insertions(+)

diff -r 0bb18319b8a0 -r 62b7b5f3029f patches/linux-2.6.16.13/series
--- a/patches/linux-2.6.16.13/series    Wed Aug 23 11:27:06 2006 +0100
+++ b/patches/linux-2.6.16.13/series    Wed Aug 23 14:34:25 2006 +0100
@@ -20,3 +20,4 @@ xenoprof-generic.patch
 xenoprof-generic.patch
 x86-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
 x86_64-put-note-sections-into-a-pt_note-segment-in-vmlinux.patch
+x86-elfnote-as-preprocessor-macro.patch
diff -r 0bb18319b8a0 -r 62b7b5f3029f 
patches/linux-2.6.16.13/x86-elfnote-as-preprocessor-macro.patch
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/linux-2.6.16.13/x86-elfnote-as-preprocessor-macro.patch   Wed Aug 
23 14:34:25 2006 +0100
@@ -0,0 +1,44 @@
+
+diff -r 4b7cd997c08f include/linux/elfnote.h
+--- a/include/linux/elfnote.h  Wed Aug 23 11:48:46 2006 +0100
++++ b/include/linux/elfnote.h  Wed Aug 23 12:44:27 2006 +0100
+@@ -31,22 +31,24 @@
+ /*
+  * 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
+-.popsection
+-.endm
++#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                           ;
+ #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] [xen-unstable] [LINUX] Define ELFNOTE as a preprocessor macro rather than an assembler macro, Xen patchbot-unstable <=