Skip to content

Commit 62a54a7

Browse files
authored
Merge pull request #199 from rust-embedded/weak-symbols
`riscv-rt`: make `abort` weak
2 parents 27c4faf + a5f4e59 commit 62a54a7

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

riscv-rt/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515

1616
- Moved all the assembly code to `asm.rs`
1717
- Use `weak` symbols for functions such as `_mp_hook` or `_start_trap`
18+
- `abort` is now `weak`, so it is possible to link third-party libraries including this symbol.
1819

1920
### Removed
2021

riscv-rt/src/asm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ trap_handler!(
337337
#[rustfmt::skip]
338338
global_asm!(
339339
".section .text.abort
340-
.global abort
340+
.weak abort
341341
abort: // make sure there is an abort symbol when linking
342342
j abort"
343343
);

0 commit comments

Comments
 (0)