diff options
author | Andrew Kaster <andrewdkaster@gmail.com> | 2020-04-11 12:24:07 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-11 22:41:05 +0200 |
commit | 21b5909dc6c912809f0ff2fd4798f0d613b36c14 (patch) | |
tree | 6de075abe62c33671da24790120d3f1232060e82 /Libraries/LibC/dlfcn.cpp | |
parent | 6b0f47683c78b0b9482efb7c95e42bb9a2bcaf7f (diff) | |
download | serenity-21b5909dc6c912809f0ff2fd4798f0d613b36c14.zip |
LibELF: Move ELF classes into namespace ELF
This is for consistency with other namespace changes that were made
a while back to the other libraries :)
Diffstat (limited to 'Libraries/LibC/dlfcn.cpp')
-rw-r--r-- | Libraries/LibC/dlfcn.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Libraries/LibC/dlfcn.cpp b/Libraries/LibC/dlfcn.cpp index 9531511525..d6be5d8867 100644 --- a/Libraries/LibC/dlfcn.cpp +++ b/Libraries/LibC/dlfcn.cpp @@ -38,12 +38,12 @@ #include <AK/ScopeGuard.h> #include <AK/String.h> #include <AK/StringBuilder.h> -#include <LibELF/ELFDynamicLoader.h> +#include <LibELF/DynamicLoader.h> // NOTE: The string here should never include a trailing newline (according to POSIX) String g_dlerror_msg; -HashMap<String, RefPtr<ELFDynamicLoader>> g_elf_objects; +HashMap<String, RefPtr<ELF::DynamicLoader>> g_elf_objects; extern "C" { @@ -74,7 +74,7 @@ void* dlopen(const char* filename, int flags) auto existing_elf_object = g_elf_objects.get(file_path.basename()); if (existing_elf_object.has_value()) { - return const_cast<ELFDynamicLoader*>(existing_elf_object.value()); + return const_cast<ELF::DynamicLoader*>(existing_elf_object.value()); } int fd = open(filename, O_RDONLY); @@ -93,7 +93,7 @@ void* dlopen(const char* filename, int flags) return nullptr; } - auto loader = ELFDynamicLoader::construct(filename, fd, file_stats.st_size); + auto loader = ELF::DynamicLoader::construct(filename, fd, file_stats.st_size); if (!loader->is_valid()) { g_dlerror_msg = String::format("%s is not a valid ELF dynamic shared object!", filename); @@ -109,14 +109,14 @@ void* dlopen(const char* filename, int flags) g_dlerror_msg = "Successfully loaded ELF object."; // we have one refcount already - return const_cast<ELFDynamicLoader*>(g_elf_objects.get(file_path.basename()).value()); + return const_cast<ELF::DynamicLoader*>(g_elf_objects.get(file_path.basename()).value()); } void* dlsym(void* handle, const char* symbol_name) { // FIXME: When called with a NULL handle we're supposed to search every dso in the process... that'll get expensive ASSERT(handle); - auto* dso = reinterpret_cast<ELFDynamicLoader*>(handle); + auto* dso = reinterpret_cast<ELF::DynamicLoader*>(handle); void* symbol = dso->symbol_for_name(symbol_name); if (!symbol) { g_dlerror_msg = "Symbol not found"; |