diff options
author | Gunnar Beutner <gbeutner@serenityos.org> | 2021-06-29 02:56:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-29 20:03:36 +0200 |
commit | 5afec84cc282d6e13967f5602fb31bc9c771e148 (patch) | |
tree | 5c3c991dcf79fc3e3d24c9e003240dc17034b1d6 | |
parent | df9e73de25637c88413b045bf21cd0fec7f72a68 (diff) | |
download | serenity-5afec84cc282d6e13967f5602fb31bc9c771e148.zip |
LibELF: Add stub for R_X86_64_TPOFF64
-rw-r--r-- | Userland/Libraries/LibC/elf.h | 1 | ||||
-rw-r--r-- | Userland/Libraries/LibELF/DynamicLoader.cpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Userland/Libraries/LibC/elf.h b/Userland/Libraries/LibC/elf.h index 0d2ac66928..0edd9f6cd7 100644 --- a/Userland/Libraries/LibC/elf.h +++ b/Userland/Libraries/LibC/elf.h @@ -803,3 +803,4 @@ struct elf_args { #define R_X86_64_GLOB_DAT 6 #define R_X86_64_JUMP_SLOT 7 #define R_X86_64_RELATIVE 8 +#define R_X86_64_TPOFF64 18 diff --git a/Userland/Libraries/LibELF/DynamicLoader.cpp b/Userland/Libraries/LibELF/DynamicLoader.cpp index 1871696e51..e471f941b3 100644 --- a/Userland/Libraries/LibELF/DynamicLoader.cpp +++ b/Userland/Libraries/LibELF/DynamicLoader.cpp @@ -486,6 +486,13 @@ DynamicLoader::RelocationResult DynamicLoader::do_relocation(const ELF::DynamicO *patch_ptr = negative_offset_from_tls_block_end(res.value().value, dynamic_object_of_symbol->tls_offset().value(), res.value().size); break; } +#else + case R_X86_64_TPOFF64: + dbgln("FIXME: Patched R_X86_64_TPOFF64 relocation with invalid ptr."); + *patch_ptr = 0xaaaaaaaaaaaaaaaa; + break; +#endif +#ifndef __LP64__ case R_386_JMP_SLOT: { #else case R_X86_64_JUMP_SLOT: { |