summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2017-02-18 06:42:09 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2017-02-18 06:42:09 +0000
commit3ed732420ba96a2d80ae8a0f851b3dd5237aa202 (patch)
treed210c7bff1da37e8edfe6bf7a80c3882b485f9f8 /sys
parentf5afe23a1036737fdd82b8711196a9f92e428a19 (diff)
Add Elf{32,64}_Nhdr structs with the same member names used by libelf
and glibc. As noted by guenther@ this is the same layout as our Elf{32,64}_Note structs and the handful of uses we have in the tree may switch From _Note to _Nhdr in future. Prompted by the development version of Mesa using the Nhdr type. ok guenther@
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/exec_elf.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h
index 015003980aa..690df79ad3c 100644
--- a/sys/sys/exec_elf.h
+++ b/sys/sys/exec_elf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.h,v 1.72 2017/02/18 06:09:01 jsg Exp $ */
+/* $OpenBSD: exec_elf.h,v 1.73 2017/02/18 06:42:08 jsg Exp $ */
/*
* Copyright (c) 1995, 1996 Erik Theisen. All rights reserved.
*
@@ -532,6 +532,21 @@ typedef struct {
unsigned int elf_hash(const unsigned char *name);
/*
+ * Note header
+ */
+typedef struct {
+ Elf32_Word n_namesz;
+ Elf32_Word n_descsz;
+ Elf32_Word n_type;
+} Elf32_Nhdr;
+
+typedef struct {
+ Elf64_Half n_namesz;
+ Elf64_Half n_descsz;
+ Elf64_Half n_type;
+} Elf64_Nhdr;
+
+/*
* Note Definitions
*/
typedef struct {