rust/tests/run-make/include-all-symbols-linking/lib.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
286 B
Rust
Raw Permalink Normal View History

2022-02-09 00:02:51 +00:00
mod foo {
#[cfg_attr(target_os = "linux", link_section = ".rodata.STATIC")]
#[cfg_attr(target_vendor = "apple", link_section = "__DATA,STATIC")]
2022-02-09 00:02:51 +00:00
#[used]
static STATIC: [u32; 10] = [1; 10];
}
mod bar {
#[no_mangle]
extern "C" fn bar() -> i32 {
0
}
}