3 #![allow(non_upper_case_globals)]
4 #[cfg(not(target_os = "macos"))]
5 #[link_section=".moretext"]
6 fn i_live_in_more_text() -> &'static str {
10 #[cfg(not(target_os = "macos"))]
11 #[link_section=".imm"]
12 static magic: usize = 42;
14 #[cfg(not(target_os = "macos"))]
15 #[link_section=".mut"]
16 static mut frobulator: usize = 0xdeadbeef;
18 #[cfg(target_os = "macos")]
19 #[link_section="__TEXT,__moretext"]
20 fn i_live_in_more_text() -> &'static str {
24 #[cfg(target_os = "macos")]
25 #[link_section="__RODATA,__imm"]
26 static magic: usize = 42;
28 #[cfg(target_os = "macos")]
29 #[link_section="__DATA,__mut"]
30 static mut frobulator: usize = 0xdeadbeef;
34 frobulator = 0x12345678;
35 println!("{} {} {}", i_live_in_more_text(), magic, frobulator);