elf.h: add definitions for symbol visibility

As defined at https://refspecs.linuxfoundation.org/elf/gabi4+/ch4.symtab.html

Change-Id: I3e89f78626e1271a99bc4b58b7edb3e169c74c64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10938
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Jessica Hamilton
2026-05-06 11:58:55 +00:00
parent 76c24b88d1
commit 8dc4944a6c
+8
View File
@@ -399,10 +399,12 @@ typedef struct {
#define ELF32_ST_BIND(i) ((i) >> 4)
#define ELF32_ST_TYPE(i) ((i) & 0xf)
#define ELF32_ST_INFO(b, t) (((b) << 4) + ((t) & 0xf))
#define ELF32_ST_VISIBILITY(o) ((o) & 0x3)
#define ELF64_ST_BIND(i) ((i) >> 4)
#define ELF64_ST_TYPE(i) ((i) & 0xf)
#define ELF64_ST_INFO(b, t) (((b) << 4) + ((t) & 0xf))
#define ELF64_ST_VISIBILITY(o) ((o) & 0x3)
/* symbol types */
#define STT_NOTYPE 0
@@ -421,6 +423,12 @@ typedef struct {
#define STB_LOPROC 13
#define STB_HIPROC 15
/* symbol visibility */
#define STV_DEFAULT 0
#define STV_INTERNAL 1
#define STV_HIDDEN 2
#define STV_PROTECTED 3
/* special symbol indices */
#define STN_UNDEF 0