diff options
author | alk3pInjection <webmaster@raspii.tech> | 2024-02-04 16:16:35 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2024-02-04 16:16:35 +0800 |
commit | abdaadbcae30fe0c9a66c7516798279fdfd97750 (patch) | |
tree | 00a54a6e25601e43876d03c1a4a12a749d4a914c /share/doc/gccint/Emulated-TLS.html |
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Change-Id: I7303388733328cd98ab9aa3c30236db67f2e9e9c
Diffstat (limited to 'share/doc/gccint/Emulated-TLS.html')
-rw-r--r-- | share/doc/gccint/Emulated-TLS.html | 174 |
1 files changed, 174 insertions, 0 deletions
diff --git a/share/doc/gccint/Emulated-TLS.html b/share/doc/gccint/Emulated-TLS.html new file mode 100644 index 0000000..11ae4ac --- /dev/null +++ b/share/doc/gccint/Emulated-TLS.html @@ -0,0 +1,174 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 1988-2023 Free Software Foundation, Inc. + +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with the +Invariant Sections being "Funding Free Software", the Front-Cover +Texts being (a) (see below), and with the Back-Cover Texts being (b) +(see below). A copy of the license is included in the section entitled +"GNU Free Documentation License". + +(a) The FSF's Front-Cover Text is: + +A GNU Manual + +(b) The FSF's Back-Cover Text is: + +You have freedom to copy and modify this GNU Manual, like GNU + software. Copies published by the Free Software Foundation raise + funds for GNU development. --> +<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> +<head> +<title>GNU Compiler Collection (GCC) Internals: Emulated TLS</title> + +<meta name="description" content="GNU Compiler Collection (GCC) Internals: Emulated TLS"> +<meta name="keywords" content="GNU Compiler Collection (GCC) Internals: Emulated TLS"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link href="index.html#Top" rel="start" title="Top"> +<link href="Option-Index.html#Option-Index" rel="index" title="Option Index"> +<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="Target-Macros.html#Target-Macros" rel="up" title="Target Macros"> +<link href="MIPS-Coprocessors.html#MIPS-Coprocessors" rel="next" title="MIPS Coprocessors"> +<link href="Target-Attributes.html#Target-Attributes" rel="previous" title="Target Attributes"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.indentedblock {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smallindentedblock {margin-left: 3.2em; font-size: smaller} +div.smalllisp {margin-left: 3.2em} +kbd {font-style:oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nocodebreak {white-space:nowrap} +span.nolinebreak {white-space:nowrap} +span.roman {font-family:serif; font-weight:normal} +span.sansserif {font-family:sans-serif; font-weight:normal} +ul.no-bullet {list-style: none} +--> +</style> + + +</head> + +<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> +<a name="Emulated-TLS"></a> +<div class="header"> +<p> +Next: <a href="MIPS-Coprocessors.html#MIPS-Coprocessors" accesskey="n" rel="next">MIPS Coprocessors</a>, Previous: <a href="Target-Attributes.html#Target-Attributes" accesskey="p" rel="previous">Target Attributes</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> +</div> +<hr> +<a name="Emulating-TLS"></a> +<h3 class="section">18.25 Emulating TLS</h3> +<a name="index-Emulated-TLS"></a> + +<p>For targets whose psABI does not provide Thread Local Storage via +specific relocations and instruction sequences, an emulation layer is +used. A set of target hooks allows this emulation layer to be +configured for the requirements of a particular target. For instance +the psABI may in fact specify TLS support in terms of an emulation +layer. +</p> +<p>The emulation layer works by creating a control object for every TLS +object. To access the TLS object, a lookup function is provided +which, when given the address of the control object, will return the +address of the current thread’s instance of the TLS object. +</p> +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fGET_005fADDRESS"></a>Target Hook: <em>const char *</em> <strong>TARGET_EMUTLS_GET_ADDRESS</strong></dt> +<dd><p>Contains the name of the helper function that uses a TLS control +object to locate a TLS instance. The default causes libgcc’s +emulated TLS helper function to be used. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fREGISTER_005fCOMMON"></a>Target Hook: <em>const char *</em> <strong>TARGET_EMUTLS_REGISTER_COMMON</strong></dt> +<dd><p>Contains the name of the helper function that should be used at +program startup to register TLS objects that are implicitly +initialized to zero. If this is <code>NULL</code>, all TLS objects will +have explicit initializers. The default causes libgcc’s emulated TLS +registration function to be used. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fVAR_005fSECTION"></a>Target Hook: <em>const char *</em> <strong>TARGET_EMUTLS_VAR_SECTION</strong></dt> +<dd><p>Contains the name of the section in which TLS control variables should +be placed. The default of <code>NULL</code> allows these to be placed in +any section. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fTMPL_005fSECTION"></a>Target Hook: <em>const char *</em> <strong>TARGET_EMUTLS_TMPL_SECTION</strong></dt> +<dd><p>Contains the name of the section in which TLS initializers should be +placed. The default of <code>NULL</code> allows these to be placed in any +section. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fVAR_005fPREFIX"></a>Target Hook: <em>const char *</em> <strong>TARGET_EMUTLS_VAR_PREFIX</strong></dt> +<dd><p>Contains the prefix to be prepended to TLS control variable names. +The default of <code>NULL</code> uses a target-specific prefix. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fTMPL_005fPREFIX"></a>Target Hook: <em>const char *</em> <strong>TARGET_EMUTLS_TMPL_PREFIX</strong></dt> +<dd><p>Contains the prefix to be prepended to TLS initializer objects. The +default of <code>NULL</code> uses a target-specific prefix. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fVAR_005fFIELDS"></a>Target Hook: <em>tree</em> <strong>TARGET_EMUTLS_VAR_FIELDS</strong> <em>(tree <var>type</var>, tree *<var>name</var>)</em></dt> +<dd><p>Specifies a function that generates the FIELD_DECLs for a TLS control +object type. <var>type</var> is the RECORD_TYPE the fields are for and +<var>name</var> should be filled with the structure tag, if the default of +<code>__emutls_object</code> is unsuitable. The default creates a type suitable +for libgcc’s emulated TLS function. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fVAR_005fINIT"></a>Target Hook: <em>tree</em> <strong>TARGET_EMUTLS_VAR_INIT</strong> <em>(tree <var>var</var>, tree <var>decl</var>, tree <var>tmpl_addr</var>)</em></dt> +<dd><p>Specifies a function that generates the CONSTRUCTOR to initialize a +TLS control object. <var>var</var> is the TLS control object, <var>decl</var> +is the TLS object and <var>tmpl_addr</var> is the address of the +initializer. The default initializes libgcc’s emulated TLS control object. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fVAR_005fALIGN_005fFIXED"></a>Target Hook: <em>bool</em> <strong>TARGET_EMUTLS_VAR_ALIGN_FIXED</strong></dt> +<dd><p>Specifies whether the alignment of TLS control variable objects is +fixed and should not be increased as some backends may do to optimize +single objects. The default is false. +</p></dd></dl> + +<dl> +<dt><a name="index-TARGET_005fEMUTLS_005fDEBUG_005fFORM_005fTLS_005fADDRESS"></a>Target Hook: <em>bool</em> <strong>TARGET_EMUTLS_DEBUG_FORM_TLS_ADDRESS</strong></dt> +<dd><p>Specifies whether a DWARF <code>DW_OP_form_tls_address</code> location descriptor +may be used to describe emulated TLS control objects. +</p></dd></dl> + +<hr> +<div class="header"> +<p> +Next: <a href="MIPS-Coprocessors.html#MIPS-Coprocessors" accesskey="n" rel="next">MIPS Coprocessors</a>, Previous: <a href="Target-Attributes.html#Target-Attributes" accesskey="p" rel="previous">Target Attributes</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p> +</div> + + + +</body> +</html> |