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, May 3, 12:17 PM
Unknown Object (File)
Tue, Apr 28, 12:21 AM
Unknown Object (File)
Sat, Apr 25, 4:18 AM
Unknown Object (File)
Thu, Apr 23, 6:26 PM
Unknown Object (File)
Thu, Apr 23, 12:29 PM
Unknown Object (File)
Thu, Apr 23, 4:47 AM
Unknown Object (File)
Tue, Apr 21, 8:23 PM
Unknown Object (File)
Apr 9 2026, 1:23 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