struct LocalRuntimeTlsDescResolver

Defined at line 358 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h

This provides a callable object for resolving TLSDESC relocations. It can

be passed directly to elfldltl::MakeSymbolResolver (by reference).

This uses the _ld_tlsdesc_runtime_* entry points declared above and provided

in the library, and so is only appropriate for use within the same module,

address space, and ABI and where the TLSDESC accesses will be made.

This handles only the static TLS cases, by using defn->static_tls_bias().

Where dynamic TLS is also possible, a subclass can do something like:

```

using ld::LocalRuntimeTlsDescResolver::operator();

...

fit::result

<bool

, TlsDescGot> operator()(auto

&

diag, const auto

&

defn) const {

assert(defn->tls_module_id() != 0);

if (IsInStaticTls(defn)) {

return ld::LocalRuntimeTlsDescResolver::operator()(diag, defn);

}

return fit::ok(TlsDescGot{...});

}

```

Public Members

static UnsignedField kRuntimeStatic
static UnsignedField kRuntimeUndefinedWeak
static UnsignedField kRuntimeUndefinedWeakAddend

Public Methods

TlsDescGot operator() (Addend addend)

Handle an undefined weak TLSDESC reference. There are special runtime

resolvers for this case: one for zero addend, and one for nonzero addend.

Defined at line 366 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h

TlsDescGot operator() (Addend addend)

Handle an undefined weak TLSDESC reference. There are special runtime

resolvers for this case: one for zero addend, and one for nonzero addend.

Defined at line 366 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h

template <auto& diag, auto& defn>
fit::result<bool, TlsDescGot> operator() (auto & diag, const auto & defn)

Handle a TLSDESC reference to a defined symbol. The runtime resolver just

loads the static TLS offset from the value slot. When the relocation is

applied the addend will be added to the value computed here from the

symbol's value and module's PT_TLS offset.

Defined at line 380 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h

template <auto& diag, auto& defn>
fit::result<bool, TlsDescGot> operator() (auto & diag, const auto & defn)

Handle a TLSDESC reference to a defined symbol. The runtime resolver just

loads the static TLS offset from the value slot. When the relocation is

applied the addend will be added to the value computed here from the

symbol's value and module's PT_TLS offset.

Defined at line 380 of file ../../sdk/lib/ld/include/lib/ld/tlsdesc.h