Skip to content

Commit 66a90cd

Browse files
bors[bot]japaric
andcommitted
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 <[email protected]>
2 parents b947f36 + 5975c99 commit 66a90cd

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

cortex-m-rt/CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.6.1] - 2018-09-06
11+
12+
### Changed
13+
14+
- Produce a better error message if two (or more) copies of `cortex-m-rt` are
15+
going to be linked into a binary.
16+
1017
## [v0.6.0] - 2018-09-06
1118

1219
### Changed
@@ -351,7 +358,9 @@ section size addr
351358

352359
Initial release
353360

354-
[Unreleased]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.3...HEAD
361+
[Unreleased]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.6.1...HEAD
362+
[v0.6.1]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.6.0...v0.6.1
363+
[v0.6.0]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.3...v0.6.0
355364
[v0.5.3]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.2...v0.5.3
356365
[v0.5.2]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.1...v0.5.2
357366
[v0.5.1]: https://github.com/rust-embedded/cortex-m-rt/compare/v0.5.0...v0.5.1

cortex-m-rt/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ license = "MIT OR Apache-2.0"
88
name = "cortex-m-rt"
99
readme = "README.md"
1010
repository = "https://github.com/japaric/cortex-m-rt"
11-
version = "0.6.0"
11+
version = "0.6.1"
1212

1313
[dependencies]
1414
r0 = "0.2.1"

cortex-m-rt/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,10 @@ use core::sync::atomic::{self, Ordering};
396396

397397
pub use macros::{entry, exception, pre_init};
398398

399+
#[export_name = "error: cortex-m-rt appears more than once in the dependency graph"]
400+
#[doc(hidden)]
401+
pub static __ONCE__: () = ();
402+
399403
/// Registers stacked (pushed into the stack) during an exception
400404
#[derive(Clone, Copy)]
401405
#[repr(C)]

0 commit comments

Comments
 (0)