Page MenuHomeFreeBSD

Correct the offset of static TLS variables for Initial-Exec.
ClosedPublic

Authored by jhb on Dec 3 2019, 10:37 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 14, 6:07 AM
Unknown Object (File)
Mar 7 2024, 10:48 AM
Unknown Object (File)
Mar 7 2024, 10:45 AM
Unknown Object (File)
Mar 7 2024, 7:17 AM
Unknown Object (File)
Feb 17 2024, 3:22 AM
Unknown Object (File)
Dec 28 2023, 12:36 AM
Unknown Object (File)
Dec 20 2023, 2:06 AM
Unknown Object (File)
Oct 25 2023, 3:36 PM
Subscribers

Details

Summary

%tp points to the start of the TLS block after the tcb, but
Obj_Entry.tlsoffset includes the tcb, so subtract the size of the
tcb to compute the offset relative to %tp.

Test Plan

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note that this is the same fix as rS339072 for powerpc and rS342671 for powerpc64, and matches the mips implementation, all of which use Variant I TLS and thus should look the same (ignoring the values of the constants themselves).

(Also, %tp in the revision summary looks odd, RISC-V doesn't prefix registers with anything)

This revision was not accepted when it landed; it landed in state Needs Review.Dec 10 2019, 9:56 PM
This revision was automatically updated to reflect the committed changes.