diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-11-11 16:10:50 +0000 |
---|---|---|
committer | Florian Fainelli <florian@openwrt.org> | 2012-11-11 16:10:50 +0000 |
commit | 2b4803f28c006d91bfbe1b631d2daa41ab186121 (patch) | |
tree | fb00c4b8ee464eaa8fc3a19b9b63b3acbdf5d3bf /toolchain | |
parent | 3cacce55ae1b2c311f6f7b749b55e0114bed47e0 (diff) | |
download | master-187ad058-2b4803f28c006d91bfbe1b631d2daa41ab186121.tar.gz master-187ad058-2b4803f28c006d91bfbe1b631d2daa41ab186121.tar.bz2 master-187ad058-2b4803f28c006d91bfbe1b631d2daa41ab186121.zip |
[toolchain] uClibc: backport a fix for dlsym(RTLD_NEXT, ...) use
Signed-off-by: Florian Fainelli <florian@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@34142 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/uClibc/patches-0.9.33.2/011-dlsym_rtld_next_fix.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/toolchain/uClibc/patches-0.9.33.2/011-dlsym_rtld_next_fix.patch b/toolchain/uClibc/patches-0.9.33.2/011-dlsym_rtld_next_fix.patch new file mode 100644 index 0000000000..5c90ca590b --- /dev/null +++ b/toolchain/uClibc/patches-0.9.33.2/011-dlsym_rtld_next_fix.patch @@ -0,0 +1,26 @@ +diff -urN uClibc-0.9.33.2/ldso/libdl/libdl.c uClibc-0.9.33.2.new/ldso/libdl/libdl.c +--- uClibc-0.9.33.2/ldso/libdl/libdl.c 2012-05-15 09:20:09.000000000 +0200 ++++ uClibc-0.9.33.2.new/ldso/libdl/libdl.c 2012-11-10 18:34:56.673501060 +0100 +@@ -671,7 +671,7 @@ + { + struct elf_resolve *tpnt, *tfrom; + struct dyn_elf *handle; +- ElfW(Addr) from; ++ ElfW(Addr) from = 0; + struct dyn_elf *rpnt; + void *ret; + struct symbol_ref sym_ref = { NULL, NULL }; +@@ -729,7 +729,12 @@ + tpnt = NULL; + if (handle == _dl_symbol_tables) + tpnt = handle->dyn; /* Only search RTLD_GLOBAL objs if global object */ +- ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref); ++ do { ++ ret = _dl_find_hash(name2, &handle->dyn->symbol_scope, tpnt, ELF_RTYPE_CLASS_DLSYM, &sym_ref); ++ if (ret != NULL) ++ break; ++ handle = handle->next; ++ } while (from && handle); + + #if defined(USE_TLS) && USE_TLS && defined SHARED + if (sym_ref.sym && (ELF_ST_TYPE(sym_ref.sym->st_info) == STT_TLS) && (sym_ref.tpnt)) { |