summaryrefslogtreecommitdiffstats
path: root/sys/sys/exec_elf.h
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2017-02-18 06:42:08 +0000
committerjsg <jsg@openbsd.org>2017-02-18 06:42:08 +0000
commit994c3cb3097c85ad98957ffe80274a6239ee1023 (patch)
tree1594937e15509256582560e704f2c36b9d582b6e /sys/sys/exec_elf.h
parentInclude sys/types.h rather than machine/_types.h. With this change (diff)
downloadwireguard-openbsd-994c3cb3097c85ad98957ffe80274a6239ee1023.tar.xz
wireguard-openbsd-994c3cb3097c85ad98957ffe80274a6239ee1023.zip
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/sys/exec_elf.h')
-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 {