diff --git a/src/system/runtime_loader/elf_symbol_lookup.cpp b/src/system/runtime_loader/elf_symbol_lookup.cpp index 05c7c56060..d271abf65e 100644 --- a/src/system/runtime_loader/elf_symbol_lookup.cpp +++ b/src/system/runtime_loader/elf_symbol_lookup.cpp @@ -529,14 +529,8 @@ resolve_symbol(image_t* rootImage, image_t* image, elf_sym* sym, void* location = NULL; if (sharedSym == NULL) { // symbol not found at all - if (sym->Bind() == STB_WEAK) { - // weak symbol: treat as NULL - lookupError = SUCCESS; - location = sharedImage = NULL; - } else { - lookupError = ERROR_NO_SYMBOL; - sharedImage = NULL; - } + lookupError = ERROR_NO_SYMBOL; + sharedImage = NULL; } else if (sym->Type() != STT_NOTYPE && sym->Type() != sharedSym->Type()) { // symbol not of the requested type @@ -588,8 +582,7 @@ resolve_symbol(image_t* rootImage, image_t* image, elf_sym* sym, return B_MISSING_SYMBOL; } - if (location != NULL) - cache->SetSymbolValueAt(index, (addr_t)location, sharedImage); + cache->SetSymbolValueAt(index, (addr_t)location, sharedImage); if (symbolImage) *symbolImage = sharedImage;