summaryrefslogtreecommitdiff
path: root/gcc/tree-emutls.c
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-03-19 23:26:00 -0400
committermidipix <writeonce@midipix.org>2015-03-19 23:26:00 -0400
commit5621b0947f362f74f04dabeb3ac09969ec9d1ded (patch)
tree52ca0ffbbc727773cefa5375d18f81e9b8784a93 /gcc/tree-emutls.c
parent71f7603808e3e9e704b393480c60b29a5ed40eb6 (diff)
downloadcbb-gcc-4.6.4-5621b0947f362f74f04dabeb3ac09969ec9d1ded.tar.bz2
cbb-gcc-4.6.4-5621b0947f362f74f04dabeb3ac09969ec9d1ded.tar.xz
emutls:
+ add support for platform-provided __emutls_get_address(); + add support for .emutlsv and .emutlst as named sections storing tls variable definitions and default values, respectively. According to the documentation, this could have also been achieved by assigning a value to TARGET_EMUTLS_VAR_SECTION; doing so, however, resulted in a compiler crash, so for now we are using a designated conditional macro instead. signed-off by Z. Gilboa; see copying.midipix (9cd0746c) for additional information.
Diffstat (limited to 'gcc/tree-emutls.c')
-rw-r--r--gcc/tree-emutls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-emutls.c b/gcc/tree-emutls.c
index 899888dfb..7bade9f49 100644
--- a/gcc/tree-emutls.c
+++ b/gcc/tree-emutls.c
@@ -257,6 +257,10 @@ get_emutls_init_templ_addr (tree decl)
targetm.emutls.tmpl_section);
}
+ #ifdef TARGET_EMUTLS_VAR_SECTION_EMUTLS
+ DECL_SECTION_NAME (to) = build_string(strlen(".emutlst"),".emutlst");
+ #endif
+
/* Create varpool node for the new variable and finalize it if it is
not external one. */
if (DECL_EXTERNAL (to))
@@ -316,6 +320,10 @@ new_emutls_decl (tree decl)
targetm.emutls.tmpl_section);
}
+ #ifdef TARGET_EMUTLS_VAR_SECTION_EMUTLS
+ DECL_SECTION_NAME (to) = build_string(strlen(".emutlsv"),".emutlsv");
+ #endif
+
/* If this variable is defined locally, then we need to initialize the
control structure with size and alignment information. Initialization
of COMMON block variables happens elsewhere via a constructor. */