1 use crate::spec
::{LinkArgs, LinkerFlavor, RelroLevel, TargetOptions, TlsModel}
;
3 pub fn opts() -> TargetOptions
{
4 let mut args
= LinkArgs
::new();
8 "-Wl,-Bstatic".to_string(),
9 "-Wl,--no-dynamic-linker".to_string(),
10 "-Wl,--gc-sections".to_string(),
15 os
: "cloudabi".to_string(),
20 position_independent_executables
: true,
21 // As CloudABI only supports static linkage, there is no need
22 // for dynamic TLS. The C library therefore does not provide
23 // __tls_get_addr(), which is normally used to perform dynamic
24 // TLS lookups by programs that make use of dlopen(). Only the
25 // "local-exec" and "initial-exec" TLS models can be used.
27 // "local-exec" is more efficient than "initial-exec", as the
28 // latter has one more level of indirection: it accesses the GOT
29 // (Global Offset Table) to obtain the effective address of a
30 // thread-local variable. Using a GOT is useful only when doing
32 tls_model
: TlsModel
::LocalExec
,
33 relro_level
: RelroLevel
::Full
,