5 #define RTLD_NEXT ((void*)-1)
10 struct elf_resolve * dyn;
11 struct dyn_elf * next_handle; /* Used by dlopen et al. */
12 struct dyn_elf * next;
13 struct dyn_elf * prev;
17 /* These entries must be in this order to be compatible with the interface used
18 by gdb to obtain the list of symbols. */
19 ElfW(Addr) loadaddr; /* Base address shared object is loaded at. */
20 char *libname; /* Absolute file name object was found in. */
21 ElfW(Dyn) *dynamic_addr; /* Dynamic section of the shared object. */
22 struct elf_resolve * next;
23 struct elf_resolve * prev;
24 /* Nothing after this address is used by gdb. */
25 enum {elf_lib, elf_executable,program_interpreter, loaded_file} libtype;
26 struct dyn_elf * symbol_scope;
27 unsigned short usage_count;
28 unsigned short int init_flag;
30 unsigned long * elf_buckets;
32 * These are only used with ELF style shared libraries
35 unsigned long * chains;
36 unsigned long dynamic_info[24];
38 unsigned long dynamic_size;
39 unsigned long n_phent;
43 /* Needed for MIPS relocation */
44 unsigned long mips_gotsym;
45 unsigned long mips_local_gotno;
46 unsigned long mips_symtabno;
50 /* this is used to store the address of relocation data words, so
51 * we don't have to calculate it every time, which requires a divide */
52 unsigned long data_words;
56 #define COPY_RELOCS_DONE 1
58 #define JMP_RELOCS_DONE 4
59 #define INIT_FUNCS_CALLED 8
61 extern struct dyn_elf * _dl_symbol_tables;
62 extern struct elf_resolve * _dl_loaded_modules;
63 extern struct dyn_elf * _dl_handles;
65 extern struct elf_resolve * _dl_check_hashed_files(const char * libname);
66 extern struct elf_resolve * _dl_add_elf_hash_table(const char * libname,
67 char * loadaddr, unsigned long * dynamic_info,
68 unsigned long dynamic_addr, unsigned long dynamic_size);
70 extern char * _dl_find_hash(const char * name, struct dyn_elf * rpnt1,
73 extern int _dl_linux_dynamic_link(void);
75 extern char * _dl_library_path;
76 extern char * _dl_not_lazy;
77 extern unsigned long _dl_elf_hash(const unsigned char *name);
79 static inline int _dl_symbol(char * name)
81 if(name[0] != '_' || name[1] != 'd' || name[2] != 'l' || name[3] != '_')
87 #define LD_ERROR_NOFILE 1
88 #define LD_ERROR_NOZERO 2
89 #define LD_ERROR_NOTELF 3
90 #define LD_ERROR_NOTMAGIC 4
91 #define LD_ERROR_NOTDYN 5
92 #define LD_ERROR_MMAP_FAILED 6
93 #define LD_ERROR_NODYNAMIC 7
94 #define LD_WRONG_RELOCS 8
95 #define LD_BAD_HANDLE 9
96 #define LD_NO_SYMBOL 10
100 #endif /* _LD_HASH_H_ */