1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:17:34 +00:00

LibELF: Copy the entire TLS segment instead of each symbol one-by-one

This automatically fixes an issue where we were accidentally copying
garbage data from beyond the TLS segment as uninitialized data isn't
actually stored inside the image.
This commit is contained in:
Tim Schumacher 2022-07-19 20:51:41 +02:00 committed by Andreas Kling
parent 6799b271bf
commit 3f59cb5e70
2 changed files with 20 additions and 31 deletions

View file

@ -136,7 +136,6 @@ private:
RelocationResult do_relocation(DynamicObject::Relocation const&, ShouldInitializeWeak should_initialize_weak);
void do_relr_relocations();
void find_tls_size_and_alignment();
ssize_t negative_offset_from_tls_block_end(ssize_t tls_offset, size_t value_of_symbol) const;
String m_filename;
String m_filepath;