musl: ldso/dlsym: fix mips returning undef dlsym
authorLuiz Angelo Daros de Luca <luizluca@gmail.com>
Fri, 16 Aug 2019 04:33:58 +0000 (01:33 -0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 17 Aug 2019 15:13:51 +0000 (17:13 +0200)
commit3b34fcaf94d001084da166028669de3e1cfd793f
tree257e850dbb243c9fd74b40dc83bf2193e962c256
parent686818810161078f9896607265551645f10bdb5b
musl: ldso/dlsym: fix mips returning undef dlsym

This happens only the second time a library is loaded by dlopen().
After lib1 is loaded, dlsym(lib1,"undef1") correctly resolves the undef
symbol from lib1 dependencies. After the second library is loaded,
dlsym(lib2,"undef1") was returning the address of "undef1" in lib2
instead of searching lib2 dependencies.

Using upstream fix which now uses the same logic for relocation time
and dlsym.

Fixes openwrt/packages#9297

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
(cherry picked from commit 0d0617ff14b8b020896680de1f1a49c7ba8a5e0d)
package/libs/toolchain/Makefile
toolchain/musl/common.mk
toolchain/musl/patches/020-mips-dlsym_donot_return_address_from_undef_sym.patch [new file with mode: 0644]