diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2018-01-18 08:17:40 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2018-01-18 08:17:40 +0000 |
commit | a030b7decd49004fc8ab4c43a316f359f4647822 (patch) | |
tree | aa8805175b38314800731685e6aad2bb714b486f /sys | |
parent | 991afe81cfef61f0312682eb733e50be5b9e0506 (diff) |
Unlike other archs, mips64 needs ld.so to know about symbol visibility and
skip symbol lookup on protected symbols. Add visibility #defines to
<sys/exec_elf.h> to support that.
ok kettenis@ visa@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/sys/exec_elf.h | 12 |
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 */ |