diff options
author | 2018-09-06 20:48:16 +0000 | |
---|---|---|
committer | 2018-09-06 20:48:16 +0000 | |
commit | 66a90cd1dc7000c61abd608cbf8eb368851b7704 (patch) | |
tree | f38f3a3d71f5a1f1dbb7fb498f29ec7206e39d47 /cortex-m-rt/src | |
parent | b947f36aa5cc7316dce2e7d012978740fb166dc3 (diff) | |
parent | 5975c99f34c2621422589d9e317592e693c5f2b9 (diff) | |
download | cortex-m-66a90cd1dc7000c61abd608cbf8eb368851b7704.tar.gz cortex-m-66a90cd1dc7000c61abd608cbf8eb368851b7704.tar.zst cortex-m-66a90cd1dc7000c61abd608cbf8eb368851b7704.zip |
Merge #106
106: error during compilation if two copies of cortex-m-rt are being linked r=adamgreig a=japaric
linking two copies into the final binary produces a confusing linker error
message. This improves the situation by producing an error at compile time.
This will have to be backported into the v0.5.x series or you won't get the new
error message.
r? @rust-embedded/cortex-m (anyone)
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'cortex-m-rt/src')
-rw-r--r-- | cortex-m-rt/src/lib.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs index 17c4a63..ad36400 100644 --- a/cortex-m-rt/src/lib.rs +++ b/cortex-m-rt/src/lib.rs @@ -396,6 +396,10 @@ use core::sync::atomic::{self, Ordering}; pub use macros::{entry, exception, pre_init}; +#[export_name = "error: cortex-m-rt appears more than once in the dependency graph"] +#[doc(hidden)] +pub static __ONCE__: () = (); + /// Registers stacked (pushed into the stack) during an exception #[derive(Clone, Copy)] #[repr(C)] |