Page MenuHomePhabricator

[ELF] Define PT_ANDROID_TLS_TPOFF
AbandonedPublic

Authored by rprichard on Oct 30 2018, 3:17 PM.

Details

Reviewers
None
Summary

This segment only appears in executables. Its p_vaddr field contains the
offset (in bytes) from the architecture-specific thread pointer to the
start of a thread's copy of the executable's TLS segment. Typically, the
ELF ABI documentation for a CPU architecture specifies how this offset is
determined, but Android uses a different layout, mostly for
backwards-compatibility reasons.

The remaining segment fields are zero.

As for the specific value -- it starts with 0x66xxxxxx because GNU seems
to be using 0x64xxxxxx, and OpenBSD is using 0x65xxxxxx. I selected the
next 5 digits at random.

Diff Detail

Event Timeline

rprichard created this revision.Oct 30 2018, 3:17 PM
rprichard abandoned this revision.Feb 22 2019, 6:45 PM

This change isn't needed anymore -- Bionic instead uses the standard TLS layout on x86-{32,64} and arm{32,64}, but with a minimum alignment of 8 words on arm{32,64}.

Herald added a project: Restricted Project. · View Herald TranscriptFeb 22 2019, 6:45 PM