aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-09-06 20:48:16 +0000
committerGravatar bors[bot] <bors[bot]@users.noreply.github.com> 2018-09-06 20:48:16 +0000
commit66a90cd1dc7000c61abd608cbf8eb368851b7704 (patch)
treef38f3a3d71f5a1f1dbb7fb498f29ec7206e39d47
parentb947f36aa5cc7316dce2e7d012978740fb166dc3 (diff)
parent5975c99f34c2621422589d9e317592e693c5f2b9 (diff)
downloadcortex-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>
-rw-r--r--cortex-m-rt/CHANGELOG.md11
-rw-r--r--cortex-m-rt/Cargo.toml2
-rw-r--r--cortex-m-rt/src/lib.rs4
3 files changed, 15 insertions, 2 deletions
diff --git a/cortex-m-rt/CHANGELOG.md b/cortex-m-rt/CHANGELOG.md
index dce4dfc..7721d91 100644
--- a/cortex-m-rt/CHANGELOG.md
+++ b/cortex-m-rt/CHANGELOG.md
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
+## [v0.6.1] - 2018-09-06
+
+### Changed
+
+- Produce a better error message if two (or more) copies of `cortex-m-rt` are
+ going to be linked into a binary.
+
## [v0.6.0] - 2018-09-06
### Changed
@@ -351,7 +358,9 @@ section size addr
Initial release
-[Unreleased]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.3...HEAD
+[Unreleased]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.6.1...HEAD
+[v0.6.1]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.6.0...v0.6.1
+[v0.6.0]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.3...v0.6.0
[v0.5.3]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.2...v0.5.3
[v0.5.2]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.1...v0.5.2
[v0.5.1]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.0...v0.5.1
diff --git a/cortex-m-rt/Cargo.toml b/cortex-m-rt/Cargo.toml
index 2035bf4..c8c84cf 100644
--- a/cortex-m-rt/Cargo.toml
+++ b/cortex-m-rt/Cargo.toml
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
name = "cortex-m-rt"
readme = "README.md"
repository = "https://github.com/japaric/cortex-m-rt"
-version = "0.6.0"
+version = "0.6.1"
[dependencies]
r0 = "0.2.1"
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)]