From 139b8f347ceba2084f3ddc60686bf4819ecb612d Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Tue, 22 Feb 2011 18:31:49 +0100 Subject: [PATCH] rtld(1), headers, manual pages: Bring in some whitespace, comment etc. fixes. These are all non-functional changes that reduce diffs to FreeBSD. Submitted-by: John Marino Taken-from: FreeBSD --- include/dlfcn.h | 35 ++++---- lib/libc/gen/dladdr.3 | 7 +- libexec/rtld-elf/map_object.c | 2 +- libexec/rtld-elf/rtld.c | 15 ++-- libexec/rtld-elf/rtld.h | 3 +- sys/sys/elf_common.h | 147 +++++++++++++++++----------------- sys/sys/link_elf.h | 2 +- 7 files changed, 102 insertions(+), 109 deletions(-) diff --git a/include/dlfcn.h b/include/dlfcn.h index 860296002e..d2a4f9f5a5 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -31,7 +31,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/include/dlfcn.h,v 1.10.2.3 2003/02/20 20:42:45 kan Exp $ - * $DragonFly: src/include/dlfcn.h,v 1.5 2004/02/26 13:58:25 joerg Exp $ */ #ifndef _DLFCN_H_ @@ -43,26 +42,26 @@ /* * Modes and flags for dlopen(). */ -#define RTLD_LAZY 1 /* Bind function calls lazily */ -#define RTLD_NOW 2 /* Bind function calls immediately */ -#define RTLD_MODEMASK 0x3 -#define RTLD_GLOBAL 0x100 /* Make symbols globally available */ -#define RTLD_LOCAL 0 /* Opposite of RTLD_GLOBAL, and the default */ -#define RTLD_TRACE 0x200 /* Trace loaded objects and exit */ +#define RTLD_LAZY 1 /* Bind function calls lazily. */ +#define RTLD_NOW 2 /* Bind function calls immediately. */ +#define RTLD_MODEMASK 0x3 +#define RTLD_GLOBAL 0x100 /* Make symbols globally available. */ +#define RTLD_LOCAL 0 /* Opposite of RTLD_GLOBAL, and the default. */ +#define RTLD_TRACE 0x200 /* Trace loaded objects and exit. */ /* * Request arguments for dlinfo(). */ -#define RTLD_DI_LINKMAP 2 -#define RTLD_DI_SERINFO 4 -#define RTLD_DI_SERINFOSIZE 5 -#define RTLD_DI_ORIGIN 6 +#define RTLD_DI_LINKMAP 2 /* Obtain link map. */ +#define RTLD_DI_SERINFO 4 /* Obtain search path info. */ +#define RTLD_DI_SERINFOSIZE 5 /* ... query for required space. */ +#define RTLD_DI_ORIGIN 6 /* Obtain object origin */ /* * Special handle arguments for dlsym()/dlinfo(). */ -#define RTLD_NEXT ((void *) -1) /* Search subsequent objects */ -#define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm */ +#define RTLD_NEXT ((void *) -1) /* Search subsequent objects. */ +#define RTLD_DEFAULT ((void *) -2) /* Use default search algorithm. */ #define RTLD_SELF ((void *) -3) /* Search the caller itself. */ #if __BSD_VISIBLE @@ -70,10 +69,10 @@ * Structure filled in by dladdr(). */ typedef struct dl_info { - const char *dli_fname; /* Pathname of shared object */ - void *dli_fbase; /* Base address of shared object */ - const char *dli_sname; /* Name of nearest symbol */ - void *dli_saddr; /* Address of nearest symbol */ + const char *dli_fname; /* Pathname of shared object. */ + void *dli_fbase; /* Base address of shared object. */ + const char *dli_sname; /* Name of nearest symbol. */ + void *dli_saddr; /* Address of nearest symbol. */ } Dl_info; /* @@ -112,7 +111,7 @@ typedef void (*dlfunc_t)(struct __dlfunc_arg); #endif /* __BSD_VISIBLE */ __BEGIN_DECLS -/* XSI functions first */ +/* XSI functions first. */ int dlclose(void *); const char *dlerror(void); void *dlopen(const char *, int); diff --git a/lib/libc/gen/dladdr.3 b/lib/libc/gen/dladdr.3 index c333813ba6..71f81cff55 100644 --- a/lib/libc/gen/dladdr.3 +++ b/lib/libc/gen/dladdr.3 @@ -24,7 +24,6 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD: src/lib/libc/gen/dladdr.3,v 1.3.2.4 2003/03/15 15:11:05 trhodes Exp $ -.\" $DragonFly: src/lib/libc/gen/dladdr.3,v 1.2 2003/06/17 04:26:42 dillon Exp $ .\" .Dd February 5, 1998 .Os @@ -41,8 +40,7 @@ .Sh DESCRIPTION The .Fn dladdr -function -queries the dynamic linker for information about the shared object +function queries the dynamic linker for information about the shared object containing the address .Fa addr . The information is returned in the structure specified by @@ -72,8 +70,7 @@ The value of the symbol returned in .Pp The .Fn dladdr -function -is available only in dynamically linked programs. +function is available only in dynamically linked programs. .Sh ERRORS If a mapped shared object containing .Fa addr diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 6a9513e3ff..a11594eb35 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -23,7 +23,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/libexec/rtld-elf/map_object.c,v 1.7.2.2 2002/12/28 19:49:41 dillon Exp $ - * $DragonFly: src/libexec/rtld-elf/map_object.c,v 1.6 2005/03/22 22:56:36 davidxu Exp $ */ #include @@ -122,6 +121,7 @@ map_object(int fd, const char *path, const struct stat *sb) case PT_DYNAMIC: phdyn = phdr; break; + case PT_TLS: phtls = phdr; break; diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c index eddf1dc567..791a90bf3c 100644 --- a/libexec/rtld-elf/rtld.c +++ b/libexec/rtld-elf/rtld.c @@ -24,7 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/libexec/rtld-elf/rtld.c,v 1.43.2.15 2003/02/20 20:42:46 kan Exp $ - * $DragonFly: src/libexec/rtld-elf/rtld.c,v 1.29 2008/01/08 00:02:04 corecode Exp $ */ /* @@ -277,7 +276,6 @@ wlock_release(void) * * The return value is the main program's entry point. */ - func_ptr_type _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entry **objp) { @@ -1348,14 +1346,12 @@ find_object2(const char *path, int *fd, struct stat *sb) _rtld_error("Cannot open \"%s\"", path); return(NULL); } - if (fstat(*fd, sb) == -1) { _rtld_error("Cannot fstat \"%s\"", path); close(*fd); *fd = -1; return NULL; } - for (obj = obj_list->next; obj != NULL; obj = obj->next) { if (obj->ino == sb->st_ino && obj->dev == sb->st_dev) { close(*fd); @@ -1397,7 +1393,6 @@ load_object(char *path) free(path); return(NULL); } - dbg("loading \"%s\"", path); obj = map_object(fd, path, &sb); close(fd); @@ -1414,8 +1409,8 @@ load_object(char *path) obj_count++; linkmap_add(obj); /* for GDB & dlinfo() */ - dbg(" %p .. %p: %s", obj->mapbase, obj->mapbase + obj->mapsize - 1, - obj->path); + dbg(" %p .. %p: %s", obj->mapbase, + obj->mapbase + obj->mapsize - 1, obj->path); if (obj->textrel) dbg(" WARNING: %s has impure text", obj->path); @@ -1778,6 +1773,7 @@ dlclose(void *handle) /* Unreference the object and its dependencies. */ root->dl_refcount--; + unref_dag(root); if (root->refcount == 0) { @@ -1837,12 +1833,11 @@ dlopen(const char *name, int mode) if (obj) { obj->dl_refcount++; - if ((mode & RTLD_GLOBAL) && objlist_find(&list_global, obj) == NULL) + if (mode & RTLD_GLOBAL && objlist_find(&list_global, obj) == NULL) objlist_push_tail(&list_global, obj); mode &= RTLD_MODEMASK; if (*old_obj_tail != NULL) { /* We loaded something new. */ assert(*old_obj_tail == obj); - result = load_needed_objects(obj); if (result != -1 && ld_tracing) goto trace; @@ -2505,6 +2500,7 @@ symlook_obj(const char *name, unsigned long hash, const Obj_Entry *obj, if (symnum >= obj->nchains) return NULL; /* Bad object */ + symp = obj->symtab + symnum; strp = obj->strtab + symp->st_name; @@ -2719,7 +2715,6 @@ tls_get_addr_common(void **dtvp, int index, size_t offset) dtv[index + 1] = (Elf_Addr)allocate_module_tls(index); wlock_release(); } - return (void*) (dtv[index + 1] + offset); } diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 594965de82..631b8989de 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -23,7 +23,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/libexec/rtld-elf/rtld.h,v 1.15.2.6 2003/02/20 20:42:46 kan Exp $ - * $DragonFly: src/libexec/rtld-elf/rtld.h,v 1.11 2005/05/11 19:47:06 dillon Exp $ */ #ifndef RTLD_H /* { */ @@ -213,6 +212,7 @@ extern Elf_Addr _GLOBAL_OFFSET_TABLE_[]; */ const char *basename(const char *); int do_copy_relocations(Obj_Entry *); + unsigned long elf_hash(const char *); const Elf_Sym *find_symdef(unsigned long, const Obj_Entry *, const Obj_Entry **, bool, SymCache *); @@ -234,4 +234,5 @@ void *allocate_module_tls(int); bool allocate_tls_offset(Obj_Entry *); void free_tls_offset(Obj_Entry *); void allocate_initial_tls(Obj_Entry *); + #endif /* } */ diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 2a4a91cdb5..5df5c9b19f 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -24,7 +24,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/elf_common.h,v 1.5.2.3 2001/02/28 02:30:46 obrien Exp $ - * $DragonFly: src/sys/sys/elf_common.h,v 1.22 2007/12/15 11:39:15 swildner Exp $ */ #ifndef _SYS_ELF_COMMON_H_ @@ -54,7 +53,7 @@ typedef struct { } Elf_Note; /* Indexes into the e_ident array. Keep synced with - http://www.caldera.com/developers/gabi/ */ + http://www.sco.com/developers/gabi/latest/ch4.eheader.html */ #define EI_MAG0 0 /* Magic number, byte 0. */ #define EI_MAG1 1 /* Magic number, byte 1. */ #define EI_MAG2 2 /* Magic number, byte 2. */ @@ -72,8 +71,8 @@ typedef struct { #define ELFMAG1 'E' #define ELFMAG2 'L' #define ELFMAG3 'F' -#define ELFMAG "\177ELF" -#define SELFMAG 4 +#define ELFMAG "\177ELF" /* magic string */ +#define SELFMAG 4 /* magic string size */ /* Values for e_ident[EI_VERSION] and e_version. */ #define EV_NONE 0 @@ -122,10 +121,10 @@ typedef struct { #define ET_EXEC 2 /* Executable. */ #define ET_DYN 3 /* Shared object. */ #define ET_CORE 4 /* Core file. */ -#define ET_LOOS 0xfe00 /* OS-specific range start. */ -#define ET_HIOS 0xfeff /* OS-specific range end. */ -#define ET_LOPROC 0xff00 /* Processor-specific range start. */ -#define ET_HIPROC 0xffff /* Processor-specific range end. */ +#define ET_LOOS 0xfe00 /* First operating system specific. */ +#define ET_HIOS 0xfeff /* Last operating system-specific. */ +#define ET_LOPROC 0xff00 /* First processor-specific. */ +#define ET_HIPROC 0xffff /* Last processor-specific. */ /* Values for e_machine. */ #define EM_NONE 0 /* Unknown machine. */ @@ -136,47 +135,47 @@ typedef struct { #define EM_88K 5 /* Motorola 88000. */ /* 6 reserved (was EM_486) */ #define EM_860 7 /* Intel i860. */ -#define EM_MIPS 8 /* MIPS R3000 Big-Endian only */ +#define EM_MIPS 8 /* MIPS R3000 Big-Endian only. */ /* Extensions. */ -#define EM_S370 9 /* IBM System/370 */ +#define EM_S370 9 /* IBM System/370. */ #define EM_MIPS_RS4_BE 10 /* MIPS R4000 Big-Endian */ /* Depreciated */ /* 11-14 reserved */ -#define EM_PARISC 15 /* HPPA */ +#define EM_PARISC 15 /* HP PA-RISC. */ /* 16 reserved */ -#define EM_VPP500 17 /* Fujitsu VPP500 */ -#define EM_SPARC32PLUS 18 /* SPARC v8plus */ -#define EM_960 19 /* Intel 80960 */ -#define EM_PPC 20 /* PowerPC 32-bit */ -#define EM_PPC64 21 /* PowerPC 64-bit */ -#define EM_S390 22 /* IBM S390 */ +#define EM_VPP500 17 /* Fujitsu VPP500. */ +#define EM_SPARC32PLUS 18 /* SPARC v8plus. */ +#define EM_960 19 /* Intel 80960. */ +#define EM_PPC 20 /* PowerPC 32-bit. */ +#define EM_PPC64 21 /* PowerPC 64-bit. */ +#define EM_S390 22 /* IBM System/390. */ /* 23-35 reserved */ -#define EM_V800 36 /* NEC V800 series */ -#define EM_FR20 37 /* Fujitsu FR20 */ -#define EM_RH32 38 /* TRW RH-32 */ -#define EM_RCE 39 /* Motorola RCE */ -#define EM_ARM 40 /* ARM */ +#define EM_V800 36 /* NEC V800. */ +#define EM_FR20 37 /* Fujitsu FR20. */ +#define EM_RH32 38 /* TRW RH-32. */ +#define EM_RCE 39 /* Motorola RCE. */ +#define EM_ARM 40 /* ARM. */ #define EM_ALPHA 41 /* Digital Alpha */ -#define EM_SH 42 /* Hitachi SH */ -#define EM_SPARCV9 43 /* SPARC v9 64-bit */ -#define EM_TRICORE 44 /* Siemens Tricore */ -#define EM_ARC 45 /* Argonaut RISC Core */ -#define EM_H8_300 46 /* Hitachi H8/300 */ -#define EM_H8_300H 47 /* Hitachi H8/300H */ -#define EM_H8S 48 /* Hitachi H8S */ -#define EM_H8_500 49 /* Hitachi H8/500 */ -#define EM_IA_64 50 /* Intel IA-46 Processor */ -#define EM_MIPS_X 51 /* Stanford MIPS-X */ -#define EM_COLDFIRE 52 /* Motorola Coldfire */ -#define EM_68HC12 53 /* Motorola M68HC12 */ -#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/ -#define EM_PCP 55 /* Siemens PCP */ -#define EM_NCPU 56 /* Sony nCPU embeeded RISC */ -#define EM_NDR1 57 /* Denso NDR1 microprocessor */ -#define EM_STARCORE 58 /* Motorola Start*Core processor */ -#define EM_ME16 59 /* Toyota ME16 processor */ -#define EM_ST100 60 /* STMicroelectronic ST100 processor */ -#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ +#define EM_SH 42 /* Hitachi SH. */ +#define EM_SPARCV9 43 /* SPARC v9 64-bit. */ +#define EM_TRICORE 44 /* Siemens TriCore embedded processor. */ +#define EM_ARC 45 /* Argonaut RISC Core. */ +#define EM_H8_300 46 /* Hitachi H8/300. */ +#define EM_H8_300H 47 /* Hitachi H8/300H. */ +#define EM_H8S 48 /* Hitachi H8S. */ +#define EM_H8_500 49 /* Hitachi H8/500. */ +#define EM_IA_64 50 /* Intel IA-64 Processor. */ +#define EM_MIPS_X 51 /* Stanford MIPS-X. */ +#define EM_COLDFIRE 52 /* Motorola ColdFire. */ +#define EM_68HC12 53 /* Motorola M68HC12. */ +#define EM_MMA 54 /* Fujitsu MMA. */ +#define EM_PCP 55 /* Siemens PCP. */ +#define EM_NCPU 56 /* Sony nCPU. */ +#define EM_NDR1 57 /* Denso NDR1 microprocessor. */ +#define EM_STARCORE 58 /* Motorola Star*Core processor. */ +#define EM_ME16 59 /* Toyota ME16 processor. */ +#define EM_ST100 60 /* STMicroelectronics ST100 processor. */ +#define EM_TINYJ 61 /* Advanced Logic Corp. TinyJ processor. */ #define EM_X86_64 62 /* Advanced Micro Devices x86-64 */ #define EM_PDSP 63 /* Sony DSP Processor */ #define EM_FX66 66 /* Siemens FX66 microcontroller */ @@ -232,11 +231,11 @@ typedef struct { #define SHN_LORESERVE 0xff00 /* First of reserved range. */ #define SHN_LOPROC 0xff00 /* First processor-specific. */ #define SHN_HIPROC 0xff1f /* Last processor-specific. */ -#define SHN_LOOS 0xff20 /* First OS-specific. */ -#define SHN_HIOS 0xff3f /* Last OS-specific. */ +#define SHN_LOOS 0xff20 /* First operating system-specific. */ +#define SHN_HIOS 0xff3f /* Last operating system-specific. */ #define SHN_ABS 0xfff1 /* Absolute values. */ #define SHN_COMMON 0xfff2 /* Common data. */ -#define SHN_XINDEX 0xffff /* Section header index too large. */ +#define SHN_XINDEX 0xffff /* Escape -- index stored elsewhere. */ #define SHN_HIRESERVE 0xffff /* Last of reserved range. */ /* sh_type */ @@ -244,20 +243,22 @@ typedef struct { #define SHT_PROGBITS 1 /* program defined information */ #define SHT_SYMTAB 2 /* symbol table section */ #define SHT_STRTAB 3 /* string table section */ -#define SHT_RELA 4 /* relocation section with addends*/ +#define SHT_RELA 4 /* relocation section with addends */ #define SHT_HASH 5 /* symbol hash table section */ #define SHT_DYNAMIC 6 /* dynamic section */ #define SHT_NOTE 7 /* note section */ #define SHT_NOBITS 8 /* no space section */ -#define SHT_REL 9 /* relation section without addends */ +#define SHT_REL 9 /* relocation section - no addends */ #define SHT_SHLIB 10 /* reserved - purpose unknown */ #define SHT_DYNSYM 11 /* dynamic symbol table section */ -#define SHT_INIT_ARRAY 14 /* array of constructors */ -#define SHT_FINI_ARRAY 15 /* array of destructors */ -#define SHT_PREINIT_ARRAY 16 /* array of pre-constructors */ -#define SHT_GROUP 17 /* array of pre-constructors */ -#define SHT_SYMTAB_SHNDX 18 /* extended section indices */ +#define SHT_INIT_ARRAY 14 /* Initialization function pointers. */ +#define SHT_FINI_ARRAY 15 /* Termination function pointers. */ +#define SHT_PREINIT_ARRAY 16 /* Pre-initialization function ptrs. */ +#define SHT_GROUP 17 /* Section group. */ +#define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */ + #define SHT_NUM 19 /* number of section types */ + #define SHT_LOOS 0x60000000 /* First of OS specific semantics */ #define SHT_HIOS 0x6fffffff /* Last of OS specific semantics */ #define SHT_LOPROC 0x70000000 /* reserved range for processor */ @@ -271,9 +272,9 @@ typedef struct { #define SHF_EXECINSTR 0x4 /* Section contains instructions. */ #define SHF_MERGE 0x10 /* Section may be merged. */ #define SHF_STRINGS 0x20 /* Section contains strings. */ -#define SHF_INFO_LINK 0x40 /* sh_info contains SHT index. */ -#define SHF_LINK_ORDER 0x80 /* Preserve order after combining. */ -#define SHF_OS_NONCONFORMING 0x100 /* Section requires OS-specific */ +#define SHF_INFO_LINK 0x40 /* sh_info holds section index. */ +#define SHF_LINK_ORDER 0x80 /* Special ordering requirements. */ +#define SHF_OS_NONCONFORMING 0x100 /* OS-specific processing required. */ /* handling */ #define SHF_GROUP 0x200 /* Section is a member of a group. */ #define SHF_TLS 0x400 /* Section contains TLS data. */ @@ -282,8 +283,8 @@ typedef struct { /* Section group flags. */ #define GRP_COMDAT 0x1 /* Group is a COMDAT. */ -#define GRP_MASKOS 0x0ff00000 /* Reserved for OS-specific. */ -#define GRP_MASKPROC 0xf0000000 /* Reserved for processor-specific. */ +#define SHF_MASKOS 0x0ff00000 /* OS-specific semantics. */ +#define SHF_MASKPROC 0xf0000000 /* Processor-specific semantics. */ /* Values for p_type. */ #define PT_NULL 0 /* Unused entry. */ @@ -297,8 +298,8 @@ typedef struct { #define PT_COUNT 8 /* Number of defined p_type values. */ -#define PT_LOOS 0x60000000 /* OS-specific */ -#define PT_HIOS 0x6fffffff /* OS-specific */ +#define PT_LOOS 0x60000000 /* First OS-specific. */ +#define PT_HIOS 0x6fffffff /* Last OS-specific. */ #define PT_LOPROC 0x70000000 /* First processor-specific type. */ #define PT_HIPROC 0x7fffffff /* Last processor-specific type. */ @@ -306,8 +307,8 @@ typedef struct { #define PF_X 0x1 /* Executable. */ #define PF_W 0x2 /* Writable. */ #define PF_R 0x4 /* Readable. */ -#define PF_MASKOS 0x0ff00000 /* Reserved for OS-specific. */ -#define PF_MASKPROC 0xf0000000 /* Reserved for processor-specific. */ +#define PF_MASKOS 0x0ff00000 /* Operating system-specific. */ +#define PF_MASKPROC 0xf0000000 /* Processor-specific. */ /* Values for d_tag. */ #define DT_NULL 0 /* Terminating entry. */ @@ -390,10 +391,10 @@ typedef struct { #define STB_LOCAL 0 /* Local symbol */ #define STB_GLOBAL 1 /* Global symbol */ #define STB_WEAK 2 /* like global - lower precedence */ -#define STB_LOOS 10 /* reserved range for OS specific */ -#define STB_HIOS 12 /* symbol bindings */ +#define STB_LOOS 10 /* Reserved range for operating system */ +#define STB_HIOS 12 /* specific semantics. */ #define STB_LOPROC 13 /* reserved range for processor */ -#define STB_HIPROC 15 /* specific symbol bindings */ +#define STB_HIPROC 15 /* specific semantics. */ /* Symbol type - ELFNN_ST_TYPE - st_info */ #define STT_NOTYPE 0 /* Unspecified type. */ @@ -401,20 +402,20 @@ typedef struct { #define STT_FUNC 2 /* Function. */ #define STT_SECTION 3 /* Section. */ #define STT_FILE 4 /* Source file. */ -#define STT_COMMON 5 /* Unintialized common block. */ +#define STT_COMMON 5 /* Uninitialized common block. */ #define STT_TLS 6 /* TLS object. */ -#define STT_LOOS 10 /* reserved range for OS specific */ -#define STT_HIOS 12 /* symbol bindings */ +#define STT_LOOS 10 /* Reserved range for operating system */ +#define STT_HIOS 12 /* specific semantics. */ #define STT_LOPROC 13 /* reserved range for processor */ -#define STT_HIPROC 15 /* specific symbol types */ +#define STT_HIPROC 15 /* specific semantics. */ /* Special symbol table indexes. */ #define STN_UNDEF 0 /* Undefined symbol index. */ -/* Symbol visibility flags. */ -#define STV_DEFAULT 0 /* Default symbol visibility. */ -#define STV_INTERNAL 1 /* Processor-specific visibility. */ -#define STV_HIDDEN 2 /* Symbol hidden if not exported. */ -#define STV_PROTECTED 3 /* Not preemptable, not exported. */ +/* Symbol visibility - ELFNN_ST_VISIBILITY - st_other */ +#define STV_DEFAULT 0x0 /* Default visibility (see binding). */ +#define STV_INTERNAL 0x1 /* Special meaning in relocatable objects. */ +#define STV_HIDDEN 0x2 /* Not visible. */ +#define STV_PROTECTED 0x3 /* Visible but not preemptible. */ #endif /* !_SYS_ELF_COMMON_H_ */ diff --git a/sys/sys/link_elf.h b/sys/sys/link_elf.h index 73689d354c..c3b0802dac 100644 --- a/sys/sys/link_elf.h +++ b/sys/sys/link_elf.h @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 1993 Paul Kranenburg * All rights reserved. * -- 2.41.0