linker: small code-cleanup
This patch adds to make the linker a little bit easier to understand
by making all functions that acts on a sofino object with a soinfo_
prefix.
This is to more easily distinguish functions that operate on global
state, and those that operate on individual libraries.
This should be purely stylistic, i.e. no feature/behaviour change.
Change-Id: Ie510d13d743aa4317644caefa9910b8af7e84f44
diff --git a/linker/dlfcn.c b/linker/dlfcn.c
index ac7e5d3..3d0384f 100644
--- a/linker/dlfcn.c
+++ b/linker/dlfcn.c
@@ -60,7 +60,7 @@
if (unlikely(ret == NULL)) {
set_dlerror(DL_ERR_CANNOT_LOAD_LIBRARY);
} else {
- call_constructors_recursive(ret);
+ soinfo_call_constructors(ret);
ret->refcount++;
}
pthread_mutex_unlock(&dl_lock);
@@ -103,7 +103,7 @@
}
} else {
found = (soinfo*)handle;
- sym = lookup_in_library(found, symbol);
+ sym = soinfo_lookup(found, symbol);
}
if(likely(sym != 0)) {
@@ -141,7 +141,7 @@
info->dli_fbase = (void*)si->base;
/* Determine if any symbol in the library contains the specified address */
- Elf32_Sym *sym = find_containing_symbol(addr, si);
+ Elf32_Sym *sym = soinfo_find_symbol(si, addr);
if(sym != NULL) {
info->dli_sname = si->strtab + sym->st_name;
@@ -159,7 +159,7 @@
int dlclose(void *handle)
{
pthread_mutex_lock(&dl_lock);
- (void)unload_library((soinfo*)handle);
+ (void)soinfo_unload((soinfo*)handle);
pthread_mutex_unlock(&dl_lock);
return 0;
}