File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,17 @@ pub fn opts() -> TargetOptions {
2727 linker_is_gnu : true ,
2828 pre_link_args : args,
2929 position_independent_executables : true ,
30+ // As CloudABI only supports static linkage, there is no need
31+ // for dynamic TLS. The C library therefore does not provide
32+ // __tls_get_addr(), which is normally used to perform dynamic
33+ // TLS lookups by programs that make use of dlopen(). Only the
34+ // "local-exec" and "initial-exec" TLS models can be used.
35+ //
36+ // "local-exec" is more efficient than "initial-exec", as the
37+ // latter has one more level of indirection: it accesses the GOT
38+ // (Global Offset Table) to obtain the effective address of a
39+ // thread-local variable. Using a GOT is useful only when doing
40+ // dynamic linking.
3041 tls_model : "local-exec" . to_string ( ) ,
3142 relro_level : RelroLevel :: Full ,
3243 exe_allocation_crate : super :: maybe_jemalloc ( ) ,
You can’t perform that action at this time.
0 commit comments