aboutsummaryrefslogtreecommitdiff
path: root/cortex-m-rt/src/lib.rs
diff options
context:
space:
mode:
authorGravatar Ian McIntyre <ianpmcintyre@gmail.com> 2020-07-05 09:51:17 -0400
committerGravatar Ian McIntyre <ianpmcintyre@gmail.com> 2020-07-05 09:51:17 -0400
commit434d4af0ebc3b3f409a6c1707f80506144fce63d (patch)
treec8f7e5317b57906cc0845db845ddc0676f7963b8 /cortex-m-rt/src/lib.rs
parent1bbc1bc59bf92e74cf38502d34071dcc268d402b (diff)
downloadcortex-m-434d4af0ebc3b3f409a6c1707f80506144fce63d.tar.gz
cortex-m-434d4af0ebc3b3f409a6c1707f80506144fce63d.tar.zst
cortex-m-434d4af0ebc3b3f409a6c1707f80506144fce63d.zip
Mark main() with a C ABI
The documentation says that main() should have a C ABI. Additionally, the #[entry] macro will create a main() function that has a C ABI. Marking main() as 'extern "Rust"' is inconsistent with its calling convention.
Diffstat (limited to '')
-rw-r--r--cortex-m-rt/src/lib.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs
index 1988df6..4dabb29 100644
--- a/cortex-m-rt/src/lib.rs
+++ b/cortex-m-rt/src/lib.rs
@@ -897,12 +897,11 @@ pub unsafe extern "C" fn Reset() -> ! {
static mut __edata: u32;
static __sidata: u32;
- }
-
- extern "Rust" {
// This symbol will be provided by the user via `#[entry]`
fn main() -> !;
+ }
+ extern "Rust" {
// This symbol will be provided by the user via `#[pre_init]`
fn __pre_init();
}