advanced-microcode-patching/shiva

Handling ELF TLS variables

Opened this issue · 0 comments

__thread int var;

Such variables are for thread local storage in concurrent applications. These types of variables require special handling to patch. Depending on the TLS model used:

global-dynamic.
local-dynamic.
initial-exec.
local-exec.

global-dynamic/local-dynamic sometimes utilize TLSDESC relocations. -- Handling all TLS model scenarios is a decent undertaking but not too difficult. Will require some extra deepdives into ELF TLS again.