X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=include%2Flinux%2Felfnote.h;h=f236f5b931b2a0ef0021556bf1b41be09668062a;hb=b24413180f5600bcb3bb70fbed5cf186b60864bd;hp=9a1e0674e56ce6760d5088718d468981687f3c08;hpb=d5bb306b42e39ffecaf85d1f9d04a3b5d9a97c86;p=sfrench%2Fcifs-2.6.git diff --git a/include/linux/elfnote.h b/include/linux/elfnote.h index 9a1e0674e56c..f236f5b931b2 100644 --- a/include/linux/elfnote.h +++ b/include/linux/elfnote.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LINUX_ELFNOTE_H #define _LINUX_ELFNOTE_H /* @@ -38,17 +39,25 @@ * e.g. ELFNOTE(XYZCo, 42, .asciz, "forty-two") * ELFNOTE(XYZCo, 12, .long, 0xdeadbeef) */ -#define ELFNOTE(name, type, desctype, descdata) \ -.pushsection .note.name, "",@note ; \ - .align 4 ; \ +#define ELFNOTE_START(name, type, flags) \ +.pushsection .note.name, flags,@note ; \ + .balign 4 ; \ .long 2f - 1f /* namesz */ ; \ - .long 4f - 3f /* descsz */ ; \ + .long 4484f - 3f /* descsz */ ; \ .long type ; \ 1:.asciz #name ; \ -2:.align 4 ; \ -3:desctype descdata ; \ -4:.align 4 ; \ +2:.balign 4 ; \ +3: + +#define ELFNOTE_END \ +4484:.balign 4 ; \ .popsection ; + +#define ELFNOTE(name, type, desc) \ + ELFNOTE_START(name, type, "") \ + desc ; \ + ELFNOTE_END + #else /* !__ASSEMBLER__ */ #include /* @@ -68,7 +77,7 @@ typeof(desc) _desc \ __attribute__((aligned(sizeof(Elf##size##_Word)))); \ } _ELFNOTE_PASTE(_note_, unique) \ - __attribute_used__ \ + __used \ __attribute__((section(".note." name), \ aligned(sizeof(Elf##size##_Word)), \ unused)) = { \