| Files | |
| file | dlfcn.c | 
| file | dlfcn.h | 
| UNIX-like dynamic linker interface. | |
| file | dynamic.c | 
| file | module.c | 
| file | rtld.c | 
| file | symbol.c | 
| Defines | |
| #define | NAME_BUF_SIZE 64 | 
| Functions | |
| static elf_symbol_t * | def_find_in_module (const char *name, module_t *m) | 
| void * | dlopen (const char *path, int flag) | 
| void * | dlsym (void *mod, const char *sym_name) | 
| void | dynamic_parse (elf_dyn_t *dyn_ptr, size_t bias, dyn_info_t *info) | 
| static elf_word | elf_hash (const unsigned char *name) | 
| module_t * | module_find (const char *name) | 
| Find module structure by soname/pathname. | |
| module_t * | module_load (const char *name) | 
| Load a module. | |
| void | module_load_deps (module_t *m) | 
| Load all modules on which m (transitively) depends. | |
| void | module_process_relocs (module_t *m) | 
| (Eagerly) process all relocation tables in a module. | |
| void | modules_process_relocs (module_t *start) | 
| Process relocations in modules. | |
| void | modules_untag (void) | 
| Clear BFS tags of all modules. | |
| void | rtld_init_static (void) | 
| Initialize the loder for use in a statically-linked binary. | |
| elf_symbol_t * | symbol_bfs_find (const char *name, module_t *start, module_t **mod) | 
| Find the definition of a symbol in a module and its deps. | |
| elf_symbol_t * | symbol_def_find (const char *name, module_t *origin, module_t **mod) | 
| Find the definition of a symbol. | |
| void * | symbol_get_addr (elf_symbol_t *sym, module_t *m) | 
| Variables | |
| static runtime_env_t | rt_env_static | 
| runtime_env_t * | runtime_env | 
| module_t* module_find | ( | const char * | name | ) | 
| module_t* module_load | ( | const char * | name | ) | 
| void module_process_relocs | ( | module_t * | m | ) | 
| void modules_process_relocs | ( | module_t * | start | ) | 
Find the definition of a symbol in a module and its deps.
Search the module dependency graph is breadth-first, beginning from the module start. Thus, and all its dependencies get searched.
| name | Name of the symbol to search for. | |
| start | Module in which to start the search.. | |
| mod | (output) Will be filled with a pointer to the module that contains the symbol. | 
Find the definition of a symbol.
By definition in System V ABI, if module origin has the flag DT_SYMBOLIC, origin is searched first. Otherwise, or if the symbol hasn't been found, the module dependency graph is searched breadth-first, beginning from the executable program.
| name | Name of the symbol to search for. | |
| origin | Module in which the dependency originates. | |
| mod | (output) Will be filled with a pointer to the module that contains the symbol. | 
 1.4.7
 1.4.7