Messages in this thread Patch in this message | | | From | David Howells <> | Subject | [PATCH 17/29] Provide macros for forming the name of an ELF note and its section [ver #4] | Date | Fri, 11 May 2012 00:42:10 +0100 |
| |
Provide macros for stringifying the name of an ELF note and its section appropriately so that the macro can be used in both C and assembly.
Signed-off-by: David Howells <dhowells@redhat.com> ---
include/linux/elfnote.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/elfnote.h b/include/linux/elfnote.h index 278e3ef..949d494 100644 --- a/include/linux/elfnote.h +++ b/include/linux/elfnote.h @@ -58,6 +58,7 @@ ELFNOTE_END #else /* !__ASSEMBLER__ */ +#include <linux/stringify.h> #include <linux/elf.h> /* * Use an anonymous structure which matches the shape of @@ -93,6 +94,9 @@ #define ELFNOTE32(name, type, desc) ELFNOTE(32, name, type, desc) #define ELFNOTE64(name, type, desc) ELFNOTE(64, name, type, desc) + +#define ELFNOTE_NAME(name) __stringify(name) +#define ELFNOTE_SECTION(name) ".note."ELFNOTE_NAME(name) #endif /* __ASSEMBLER__ */ #endif /* _LINUX_ELFNOTE_H */
| |