summaryrefslogtreecommitdiff
path: root/ldso/libdl
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/libdl')
-rw-r--r--ldso/libdl/Makefile.in1
-rw-r--r--ldso/libdl/libdl.c5
2 files changed, 5 insertions, 1 deletions
diff --git a/ldso/libdl/Makefile.in b/ldso/libdl/Makefile.in
index 39db7a876..152185e37 100644
--- a/ldso/libdl/Makefile.in
+++ b/ldso/libdl/Makefile.in
@@ -19,6 +19,7 @@ endif
CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
+LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-libdl.so := -Wl,--dsbt-index=3
LDFLAGS-libdl.so := $(LDFLAGS) -Wl,-fini,dl_cleanup
LIBS-libdl.so := $(LIBS) $(ldso)
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index 5007a7e65..83dfd0898 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -651,7 +651,6 @@ void *dlsym(void *vhandle, const char *name)
ElfW(Addr) from;
struct dyn_elf *rpnt;
void *ret;
- struct elf_resolve *tls_tpnt = NULL;
struct symbol_ref sym_ref = { NULL, NULL };
/* Nastiness to support underscore prefixes. */
#ifdef __UCLIBC_UNDERSCORES__
@@ -973,6 +972,10 @@ static int do_dlclose(void *vhandle, int need_fini)
free(tpnt);
}
}
+ for (rpnt1 = handle->next; rpnt1; rpnt1 = rpnt1_tmp) {
+ rpnt1_tmp = rpnt1->next;
+ free(rpnt1);
+ }
free(handle->init_fini.init_fini);
free(handle);