1 #![allow(non_upper_case_globals)]
2 #[cfg(not(target_os = "macos"))]
3 #[link_section=".moretext"]
4 fn i_live_in_more_text() -> &'static str {
8 #[cfg(not(target_os = "macos"))]
10 static magic: usize = 42;
12 #[cfg(not(target_os = "macos"))]
13 #[link_section=".mut"]
14 static mut frobulator: usize = 0xdeadbeef;
16 #[cfg(target_os = "macos")]
17 #[link_section="__TEXT,__moretext"]
18 fn i_live_in_more_text() -> &'static str {
22 #[cfg(target_os = "macos")]
23 #[link_section="__RODATA,__imm"]
24 static magic: usize = 42;
26 #[cfg(target_os = "macos")]
27 #[link_section="__DATA,__mut"]
28 static mut frobulator: usize = 0xdeadbeef;
32 frobulator = 0xcafebabe;
33 println!("{} {} {}", i_live_in_more_text(), magic, frobulator);