diff options
-rw-r--r-- | Userland/Libraries/LibELF/DynamicLinker.cpp | 8 | ||||
-rw-r--r-- | Userland/Libraries/LibELF/DynamicLoader.cpp | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibELF/DynamicLoader.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibELF/DynamicLinker.cpp b/Userland/Libraries/LibELF/DynamicLinker.cpp index 520c3f4cf2..5ddf812a26 100644 --- a/Userland/Libraries/LibELF/DynamicLinker.cpp +++ b/Userland/Libraries/LibELF/DynamicLinker.cpp @@ -88,7 +88,7 @@ static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(const St s_loaders.set(get_library_name(filename), *loader); loader->set_tls_offset(s_current_tls_offset); - s_current_tls_offset += loader->tls_size(); + s_current_tls_offset += loader->tls_size_of_current_object(); return loader; } @@ -156,8 +156,8 @@ static void allocate_tls() { size_t total_tls_size = 0; for (const auto& data : s_loaders) { - dbgln_if(DYNAMIC_LOAD_DEBUG, "{}: TLS Size: {}", data.key, data.value->tls_size()); - total_tls_size += data.value->tls_size(); + dbgln_if(DYNAMIC_LOAD_DEBUG, "{}: TLS Size: {}", data.key, data.value->tls_size_of_current_object()); + total_tls_size += data.value->tls_size_of_current_object(); } if (total_tls_size) { [[maybe_unused]] void* tls_address = ::allocate_tls(total_tls_size); @@ -420,7 +420,7 @@ void ELF::DynamicLinker::linker_main(String&& main_program_name, int main_progra dbgln_if(DYNAMIC_LOAD_DEBUG, "loaded all dependencies"); for ([[maybe_unused]] auto& lib : s_loaders) { - dbgln_if(DYNAMIC_LOAD_DEBUG, "{} - tls size: {}, tls offset: {}", lib.key, lib.value->tls_size(), lib.value->tls_offset()); + dbgln_if(DYNAMIC_LOAD_DEBUG, "{} - tls size: {}, tls offset: {}", lib.key, lib.value->tls_size_of_current_object(), lib.value->tls_offset()); } allocate_tls(); diff --git a/Userland/Libraries/LibELF/DynamicLoader.cpp b/Userland/Libraries/LibELF/DynamicLoader.cpp index fc3f3c361b..ca392b1bbb 100644 --- a/Userland/Libraries/LibELF/DynamicLoader.cpp +++ b/Userland/Libraries/LibELF/DynamicLoader.cpp @@ -64,7 +64,7 @@ DynamicLoader::DynamicLoader(int fd, String filename, void* data, size_t size) , m_file_data(data) , m_elf_image((u8*)m_file_data, m_file_size) { - m_tls_size = calculate_tls_size(); + m_tls_size_of_current_object = calculate_tls_size(); m_valid = validate(); } @@ -141,7 +141,7 @@ RefPtr<DynamicObject> DynamicLoader::map() m_dynamic_object = DynamicObject::create(m_filename, m_base_address, m_dynamic_section_address); m_dynamic_object->set_tls_offset(m_tls_offset); - m_dynamic_object->set_tls_size(m_tls_size); + m_dynamic_object->set_tls_size(m_tls_size_of_current_object); return m_dynamic_object; } diff --git a/Userland/Libraries/LibELF/DynamicLoader.h b/Userland/Libraries/LibELF/DynamicLoader.h index 6c3b136477..bad63a88e8 100644 --- a/Userland/Libraries/LibELF/DynamicLoader.h +++ b/Userland/Libraries/LibELF/DynamicLoader.h @@ -66,7 +66,7 @@ public: void load_stage_4(); void set_tls_offset(size_t offset) { m_tls_offset = offset; }; - size_t tls_size() const { return m_tls_size; } + size_t tls_size_of_current_object() const { return m_tls_size_of_current_object; } size_t tls_offset() const { return m_tls_offset; } const ELF::Image& image() const { return m_elf_image; } @@ -151,7 +151,7 @@ private: VirtualAddress m_dynamic_section_address; size_t m_tls_offset { 0 }; - size_t m_tls_size { 0 }; // TLS size of the current object + size_t m_tls_size_of_current_object { 0 }; Vector<DynamicObject::Relocation> m_unresolved_relocations; |