summaryrefslogtreecommitdiff
path: root/include/linux/elf.h
diff options
context:
space:
mode:
authorDave Martin <Dave.Martin@arm.com>2020-03-16 19:50:43 +0300
committerCatalin Marinas <catalin.marinas@arm.com>2020-03-16 20:19:48 +0300
commitdb751e309ff05461a0c8e114b1238d7a69cc1f18 (patch)
tree6f5f75e7936f4e120d4f8abf7c6e22a7bf31b19b /include/linux/elf.h
parentf8788d86ab28f61f7b46eb6be375f8a726783636 (diff)
downloadlinux-db751e309ff05461a0c8e114b1238d7a69cc1f18.tar.xz
ELF: UAPI and Kconfig additions for ELF program properties
Pull the basic ELF definitions relating to the NT_GNU_PROPERTY_TYPE_0 note from Yu-Cheng Yu's earlier x86 shstk series. Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Yu-cheng Yu <yu-cheng.yu@intel.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'include/linux/elf.h')
-rw-r--r--include/linux/elf.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/elf.h b/include/linux/elf.h
index e3649b3e970e..f7b24c5fcfb6 100644
--- a/include/linux/elf.h
+++ b/include/linux/elf.h
@@ -2,6 +2,7 @@
#ifndef _LINUX_ELF_H
#define _LINUX_ELF_H
+#include <linux/types.h>
#include <asm/elf.h>
#include <uapi/linux/elf.h>
@@ -56,4 +57,15 @@ static inline int elf_coredump_extra_notes_write(struct coredump_params *cprm) {
extern int elf_coredump_extra_notes_size(void);
extern int elf_coredump_extra_notes_write(struct coredump_params *cprm);
#endif
+
+/*
+ * NT_GNU_PROPERTY_TYPE_0 header:
+ * Keep this internal until/unless there is an agreed UAPI definition.
+ * pr_type values (GNU_PROPERTY_*) are public and defined in the UAPI header.
+ */
+struct gnu_property {
+ u32 pr_type;
+ u32 pr_datasz;
+};
+
#endif /* _LINUX_ELF_H */