__elf_error_code is defined extern into stdlib_dlclose.c bit is not defined in any other file and indeed i receive an error on link phase. Declare it not extern fix the problem and seems don't cause any problem
Elf32_Error __elf_error_code;
Can you confirm this?