rtld.h (e39756439c7255bc16ba14b7b991cb01ba1c93bd) | rtld.h (630df077ab61c69ad927873957c53efc22de140a) |
---|---|
1/*- 2 * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 63 unchanged lines hidden (view full) --- 72 73/* Lists of shared object dependencies */ 74typedef struct Struct_Needed_Entry { 75 struct Struct_Needed_Entry *next; 76 struct Struct_Obj_Entry *obj; 77 unsigned long name; /* Offset of name in string table */ 78} Needed_Entry; 79 | 1/*- 2 * Copyright 1996, 1997, 1998, 1999, 2000 John D. Polstra. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 63 unchanged lines hidden (view full) --- 72 73/* Lists of shared object dependencies */ 74typedef struct Struct_Needed_Entry { 75 struct Struct_Needed_Entry *next; 76 struct Struct_Obj_Entry *obj; 77 unsigned long name; /* Offset of name in string table */ 78} Needed_Entry; 79 |
80/* Lock object */ 81typedef struct Struct_LockInfo { 82 void *context; /* Client context for creating locks */ 83 void *thelock; /* The one big lock */ 84 /* Debugging aids. */ 85 volatile int rcount; /* Number of readers holding lock */ 86 volatile int wcount; /* Number of writers holding lock */ 87 /* Methods */ 88 void *(*lock_create)(void *context); 89 void (*rlock_acquire)(void *lock); 90 void (*wlock_acquire)(void *lock); 91 void (*rlock_release)(void *lock); 92 void (*wlock_release)(void *lock); 93 void (*lock_destroy)(void *lock); 94 void (*context_destroy)(void *context); 95} LockInfo; 96 |
|
80/* 81 * Shared object descriptor. 82 * 83 * Items marked with "(%)" are dynamically allocated, and must be freed 84 * when the structure is destroyed. 85 * 86 * CAUTION: It appears that the JDK port peeks into these structures. 87 * It looks at "next" and "mapbase" at least. Don't add new members --- 56 unchanged lines hidden (view full) --- 144 bool traced; /* Already printed in ldd trace output */ 145 bool jmpslots_done; /* Already have relocated the jump slots */ 146 147 struct link_map linkmap; /* for GDB */ 148 Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ 149 Objlist dagmembers; /* DAG has these members (%) */ 150 dev_t dev; /* Object's filesystem's device */ 151 ino_t ino; /* Object's inode number */ | 97/* 98 * Shared object descriptor. 99 * 100 * Items marked with "(%)" are dynamically allocated, and must be freed 101 * when the structure is destroyed. 102 * 103 * CAUTION: It appears that the JDK port peeks into these structures. 104 * It looks at "next" and "mapbase" at least. Don't add new members --- 56 unchanged lines hidden (view full) --- 161 bool traced; /* Already printed in ldd trace output */ 162 bool jmpslots_done; /* Already have relocated the jump slots */ 163 164 struct link_map linkmap; /* for GDB */ 165 Objlist dldags; /* Object belongs to these dlopened DAGs (%) */ 166 Objlist dagmembers; /* DAG has these members (%) */ 167 dev_t dev; /* Object's filesystem's device */ 168 ino_t ino; /* Object's inode number */ |
152 unsigned long mark; /* Set to "curmark" to avoid repeat visits */ | |
153} Obj_Entry; 154 155#define RTLD_MAGIC 0xd550b87a 156#define RTLD_VERSION 1 157 158extern void _rtld_error(const char *, ...) __printflike(1, 2); 159extern Obj_Entry *map_object(int, const char *, const struct stat *); 160extern void *xcalloc(size_t); --- 4 unchanged lines hidden (view full) --- 165/* 166 * Function declarations. 167 */ 168int do_copy_relocations(Obj_Entry *); 169unsigned long elf_hash(const char *); 170const Elf_Sym *find_symdef(unsigned long, Obj_Entry *, const Obj_Entry **, 171 bool); 172void init_pltgot(Obj_Entry *); | 169} Obj_Entry; 170 171#define RTLD_MAGIC 0xd550b87a 172#define RTLD_VERSION 1 173 174extern void _rtld_error(const char *, ...) __printflike(1, 2); 175extern Obj_Entry *map_object(int, const char *, const struct stat *); 176extern void *xcalloc(size_t); --- 4 unchanged lines hidden (view full) --- 181/* 182 * Function declarations. 183 */ 184int do_copy_relocations(Obj_Entry *); 185unsigned long elf_hash(const char *); 186const Elf_Sym *find_symdef(unsigned long, Obj_Entry *, const Obj_Entry **, 187 bool); 188void init_pltgot(Obj_Entry *); |
173void lockdflt_acquire(void *); 174void *lockdflt_create(void *); 175void lockdflt_destroy(void *); 176void lockdflt_release(void *); | 189void lockdflt_init(LockInfo *); |
177void obj_free(Obj_Entry *); 178Obj_Entry *obj_new(void); 179int reloc_non_plt(Obj_Entry *, Obj_Entry *); 180int reloc_plt(Obj_Entry *); 181int reloc_jmpslots(Obj_Entry *); 182void _rtld_bind_start(void); 183const Elf_Sym *symlook_obj(const char *, unsigned long, 184 const Obj_Entry *, bool); 185 186#endif /* } */ | 190void obj_free(Obj_Entry *); 191Obj_Entry *obj_new(void); 192int reloc_non_plt(Obj_Entry *, Obj_Entry *); 193int reloc_plt(Obj_Entry *); 194int reloc_jmpslots(Obj_Entry *); 195void _rtld_bind_start(void); 196const Elf_Sym *symlook_obj(const char *, unsigned long, 197 const Obj_Entry *, bool); 198 199#endif /* } */ |