HomeFreeBSD

tls: Introduce struct dtv and struct dtv_slot

Description

tls: Introduce struct dtv and struct dtv_slot

Rather than treating the DTV as a raw array of uintptr_t, use proper
struct types and gain the benefit of having different types for
different members. In particular, the module slots now have real pointer
types so less casting is generally needed.

Note that, whilst struct dtv_slot may seem a little unnecessary, this
will help downstream in CheriBSD where we wish to be able to easily
alter the layout of a module's slot, which this helps abstract.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D50231

Details

Provenance
jrtc27Authored on May 7 2025, 7:20 PM
Reviewer
kib
Differential Revision
D50231: tls: Introduce struct dtv and struct dtv_slot
Parents
rG0d12f495d8d9: rtld-elf: Use clear pointer provenance when updating DTV pointer
Branches
Unknown
Tags
Unknown