find_undefined_symbol_beos(): Look up the symbol in the requesting image

first. Fixes binary compatibility issue introduced with symbol preemption
support in the runtime loader. For unknown reasons liblayout.so, though
linked symbolically, contains a non-weak (!), preemptable BFont type info,
which was no longer resolved correctly with the new method.
Fixes #6892.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39617 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-11-24 22:11:42 +00:00
parent 4e5bf97339
commit 78f7f8745e
1 changed files with 11 additions and 6 deletions

View File

@ -298,14 +298,19 @@ Elf32_Sym*
find_undefined_symbol_beos(image_t* rootImage, image_t* image,
const SymbolLookupInfo& lookupInfo, image_t** foundInImage)
{
// BeOS style symbol resolution: It is sufficient to check the direct
// dependencies. The linker would have complained, if the symbol wasn't
// there.
// BeOS style symbol resolution: It is sufficient to check the image itself
// and its direct dependencies. The linker would have complained, if the
// symbol wasn't there.
Elf32_Sym* symbol = find_symbol(image, lookupInfo);
if (symbol != NULL) {
*foundInImage = image;
return symbol;
}
for (uint32 i = 0; i < image->num_needed; i++) {
if (image->needed[i]->dynamic_ptr) {
Elf32_Sym *symbol = find_symbol(image->needed[i],
lookupInfo);
if (symbol) {
symbol = find_symbol(image->needed[i], lookupInfo);
if (symbol != NULL) {
*foundInImage = image->needed[i];
return symbol;
}