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 14:57:32 +0000 (16:57 +0200)
commit0d0617ff14b8b020896680de1f1a49c7ba8a5e0d
tree4d5ba8403878d68a24986dab76345009a7431da6
parentdc451a4b24b2096fe33eb7fa136614597cd601d5
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>
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]