Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add link_section attribute for static and fn items
This allows for control over the section placement of static, static mut, and fn items. One caveat is that if a static and a static mut are placed in the same section, the static is declared first, and the static mut is assigned to, the generated program crashes. For example: #[link_section=".boot"] static foo : uint = 0xdeadbeef; #[link_section=".boot"] static mut bar : uint = 0xcafebabe; Declaring bar first would mark .bootdata as writable, preventing the crash when bar is written to.
- Loading branch information