summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/sys/exec_elf.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/sys/exec_elf.h b/sys/sys/exec_elf.h
index 817bfc69e5a..141f9d489cb 100644
--- a/sys/sys/exec_elf.h
+++ b/sys/sys/exec_elf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_elf.h,v 1.78 2017/12/09 06:35:08 deraadt Exp $ */
+/* $OpenBSD: exec_elf.h,v 1.79 2018/01/18 08:17:39 guenther Exp $ */
/*
* Copyright (c) 1995, 1996 Erik Theisen. All rights reserved.
*
@@ -356,6 +356,16 @@ typedef struct {
#define STT_LOPROC 13 /* reserved range for processor */
#define STT_HIPROC 15 /* specific symbol types */
+/* Extract symbol visibility - st_other */
+#define ELF_ST_VISIBILITY(v) ((v) & 0x3)
+#define ELF32_ST_VISIBILITY ELF_ST_VISIBILITY
+#define ELF64_ST_VISIBILITY ELF_ST_VISIBILITY
+
+#define STV_DEFAULT 0 /* Visibility set by binding type */
+#define STV_INTERNAL 1 /* OS specific version of STV_HIDDEN */
+#define STV_HIDDEN 2 /* can only be seen inside own .so */
+#define STV_PROTECTED 3 /* HIDDEN inside, DEFAULT outside */
+
/* Relocation entry with implicit addend */
typedef struct {
Elf32_Addr r_offset; /* offset of relocation */