Revert "runtime_loader: Support resolving weak symbols as NULL."
This reverts commit 74843df324
.
Reason for revert: Change was not ready, see comments on #8288.
Change-Id: I82dc23ca5a86fa2906fb6eb19f9f872603618fad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4897
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
4f912a8b33
commit
50ea01e93d
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user