]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
x86: introduce ELFNOTE macro
authorWei Liu <wei.liu2@citrix.com>
Fri, 10 Nov 2017 12:36:49 +0000 (12:36 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 16 Jan 2018 18:34:04 +0000 (18:34 +0000)
It is needed later for introducing PVH entry point.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
xen/include/asm-x86/asm_defns.h

index 9cfd79f0c6dd5cfcc756cfe2591936af9b40978e..d2d91ca1faa601501fcc869a875c566162e1788a 100644 (file)
@@ -374,4 +374,16 @@ static always_inline void stac(void)
 #define REX64_PREFIX "rex64/"
 #endif
 
+#define ELFNOTE(name, type, desc)           \
+    .pushsection .note.name, "a", @note   ; \
+    .p2align 2                            ; \
+    .long 2f - 1f       /* namesz */      ; \
+    .long 4f - 3f       /* descsz */      ; \
+    .long type          /* type   */      ; \
+1:  .asciz #name        /* name   */      ; \
+2:  .p2align 2                            ; \
+3:  desc                /* desc   */      ; \
+4:  .p2align 2                            ; \
+    .popsection
+
 #endif /* __X86_ASM_DEFNS_H__ */