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, Dec 11, 5:10 AM
Unknown Object (File)
Sun, Nov 30, 11:12 PM
Unknown Object (File)
Thu, Nov 27, 5:40 AM
Unknown Object (File)
Wed, Nov 26, 12:49 AM
Unknown Object (File)
Mon, Nov 24, 5:14 PM
Unknown Object (File)
Mon, Nov 17, 4:23 AM
Unknown Object (File)
Nov 13 2025, 2:07 AM
Unknown Object (File)
Nov 11 2025, 2:12 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