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

LibELF: Change TLS offset calculation

This changes the TLS offset calculation logic to be based on the
symbol's size instead of the total size of the TLS.

Because of this change, we no longer need to pipe "m_tls_size" to so
many functions.

Also, After this patch, the TLS data of the main program exists at the
"end" of the TLS block (Highest addresses).

This fixes a part of #6609.
This commit is contained in:
Itamar 2021-04-30 13:31:42 +03:00 committed by Andreas Kling
parent 6bbd2ebf83
commit 101ac45c1a
5 changed files with 36 additions and 33 deletions

View file

@ -264,6 +264,7 @@ public:
struct SymbolLookupResult {
FlatPtr value { 0 };
size_t size { 0 };
VirtualAddress address;
unsigned bind { STB_LOCAL };
const ELF::DynamicObject* dynamic_object { nullptr }; // The object in which the symbol is defined