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)
Tue, Jun 16, 10:42 PM
Unknown Object (File)
Fri, Jun 12, 3:35 AM
Unknown Object (File)
Wed, Jun 10, 6:19 PM
Unknown Object (File)
Mon, Jun 1, 5:06 PM
Unknown Object (File)
Mon, Jun 1, 3:05 PM
Unknown Object (File)
Mon, Jun 1, 2:53 PM
Unknown Object (File)
Fri, May 29, 9:38 PM
Unknown Object (File)
May 20 2026, 1:33 AM
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

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 27928
Build 26097: arc lint + arc unit

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.