Page MenuHomeFreeBSD

libc: Reassociate pointer arithmetic in __libc_tls_get_addr
ClosedPublic

Authored by jrtc27 on May 7 2025, 2:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 9, 1:23 AM
Unknown Object (File)
Wed, Apr 8, 8:58 PM
Unknown Object (File)
Wed, Apr 8, 1:44 AM
Unknown Object (File)
Wed, Apr 8, 1:43 AM
Unknown Object (File)
Tue, Apr 7, 9:32 AM
Unknown Object (File)
Mon, Apr 6, 1:41 PM
Unknown Object (File)
Mon, Mar 23, 4:18 PM
Unknown Object (File)
Sun, Mar 22, 10:33 PM
Subscribers

Details

Summary

Rather than compute a biased pointer only to then un-bias it again, un-bias
the offset before adding it to the DTV entry.

This mirrors rtld-elf commit d71c97026366 ("rtld-elf: Push
TLS_DTV_OFFSET into tls_get_addr_common's arguments")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable