Skip to main content

static_tls_bias_for_elf

Function static_tls_bias_for_elf 

Source
pub fn static_tls_bias_for_elf(
    path: &Path,
) -> Result<Option<i64>, TlsLayoutError>
Expand description

Return the x86_64 static TLS bias from thread pointer for an ELF module.

For the initial-exec/local-exec TLS model used by the main executable on x86_64 variant-II TLS, the DWARF TLS offset is relative to the module TLS image, while the runtime address is fsbase - aligned_tls_size + offset.