From f15e418bab33ae70e462cc66cf9e768a0e9523b9 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Fri, 22 May 2009 14:59:19 +0000 Subject: [PATCH] Removed remapping of the *stat() symbols for BeOS executables. We'll use symbol versioning instead. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30829 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../runtime_loader/elf_symbol_lookup.cpp | 39 ------------------- 1 file changed, 39 deletions(-) diff --git a/src/system/runtime_loader/elf_symbol_lookup.cpp b/src/system/runtime_loader/elf_symbol_lookup.cpp index 00b025b7dc..3ee0f453f8 100644 --- a/src/system/runtime_loader/elf_symbol_lookup.cpp +++ b/src/system/runtime_loader/elf_symbol_lookup.cpp @@ -28,38 +28,6 @@ equals_image_name(image_t* image, const char* name) } -/*! This function is called when we run BeOS images on Haiku. - It allows us to redirect functions to ensure compatibility. -*/ -static const char* -beos_compatibility_map_symbol(const char* symbolName) -{ - struct symbol_mapping { - const char* from; - const char* to; - }; - static const struct symbol_mapping kMappings[] = { - // TODO: Improve this, and also use it for libnet.so compatibility! - // Allow an image to provide a function that will be invoked for every - // (transitively) depending image. The function can return a table to - // remap symbols (probably better address to address). All the tables - // for a single image would be combined into a hash table and an - // undefined symbol patcher using this hash table would be added. - {"fstat", "__be_fstat"}, - {"lstat", "__be_lstat"}, - {"stat", "__be_stat"}, - }; - const uint32 kMappingCount = sizeof(kMappings) / sizeof(kMappings[0]); - - for (uint32 i = 0; i < kMappingCount; i++) { - if (!strcmp(symbolName, kMappings[i].from)) - return kMappings[i].to; - } - - return symbolName; -} - - // #pragma mark - @@ -366,13 +334,6 @@ resolve_symbol(image_t* rootImage, image_t* image, struct Elf32_Sym* sym, image_t* sharedImage; const char* symName = SYMNAME(image, sym); - // patch the symbol name - if (image->abi < B_HAIKU_ABI_GCC_2_HAIKU) { - // The image has been compiled with a BeOS compiler. This means - // we'll have to redirect some functions for compatibility. - symName = beos_compatibility_map_symbol(symName); - } - // get the version info const elf_version_info* versionInfo = NULL; if (image->symbol_versions != NULL) {