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)
Sun, Jul 12, 3:06 PM
Unknown Object (File)
Sun, Jul 5, 7:15 AM
Unknown Object (File)
Sat, Jul 4, 12:24 PM
Unknown Object (File)
Fri, Jul 3, 8:02 AM
Unknown Object (File)
Mon, Jun 22, 2:52 AM
Unknown Object (File)
May 25 2026, 5:22 PM
Unknown Object (File)
May 3 2026, 12:17 PM
Unknown Object (File)
Apr 28 2026, 12:21 AM
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