1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:18:11 +00:00

LibELF: Save the negative TLS offset in m_tls_offset

This makes it unnecessary to track the symbol size which just isn't
available for unexported symbols (e.g. for 'static __thread').
This commit is contained in:
Gunnar Beutner 2021-07-04 00:01:06 +02:00 committed by Andreas Kling
parent a0a38e1e84
commit 5f6ee4c539
4 changed files with 8 additions and 8 deletions

View file

@ -91,8 +91,8 @@ static Result<NonnullRefPtr<DynamicLoader>, DlErrorMessage> map_library(const St
s_loaders.set(get_library_name(filename), *loader);
s_current_tls_offset -= loader->tls_size_of_current_object();
loader->set_tls_offset(s_current_tls_offset);
s_current_tls_offset += loader->tls_size_of_current_object();
return loader;
}