Skip to main content

Tls

Enum Tls 

Source
pub enum Tls {
    General,
    Module,
    InModule,
    Slot,
    SlotAddress,
    SlotNegated,
    Offset,
    Negated,
}
Expand description

Which of the i386 thread-local relocations a Reference::Tls is, named after what the four bytes end up holding.

The suffix gcc writes for each is beside it. The linker may rewrite the instruction around the first three into a cheaper model once it knows where the variable ends up, which is why each kind is kept apart from the others rather than folded into an address or an offset.

Variants§

§

General

The pair of slots of the global offset table ___tls_get_addr takes, as a distance from the table. @TLSGD, R_386_TLS_GD.

§

Module

The same pair for the module as a whole rather than one variable. @TLSLDM, R_386_TLS_LDM.

§

InModule

How far into its module’s block a variable is, which is what goes with the address Tls::Module found. @DTPOFF, R_386_TLS_LDO_32.

§

Slot

A slot of the global offset table holding where the variable is from the thread pointer, as a distance from the table. @GOTNTPOFF, R_386_TLS_GOTIE.

§

SlotAddress

The same slot by its address, for code that is not position independent. @INDNTPOFF, R_386_TLS_IE.

§

SlotNegated

A slot holding the distance the other way round, from the variable up to the thread pointer, as a distance from the table. @GOTTPOFF, R_386_TLS_IE_32.

§

Offset

Where the variable is from the thread pointer, which is below it and so negative. @NTPOFF, R_386_TLS_LE.

§

Negated

The same distance the other way round, which is positive. @TPOFF, R_386_TLS_LE_32.

Trait Implementations§

Source§

impl Clone for Tls

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Tls

Source§

impl Debug for Tls

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Tls

Source§

impl PartialEq for Tls

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Tls

Auto Trait Implementations§

§

impl Freeze for Tls

§

impl RefUnwindSafe for Tls

§

impl Send for Tls

§

impl Sync for Tls

§

impl Unpin for Tls

§

impl UnsafeUnpin for Tls

§

impl UnwindSafe for Tls

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.