From a5f4e591aa22436ee087118997ae0cc26583fa04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rom=C3=A1n=20C=C3=A1rdenas=20Rodr=C3=ADguez?= Date: Wed, 27 Mar 2024 10:58:21 +0100 Subject: [PATCH] make abort weak --- riscv-rt/CHANGELOG.md | 1 + riscv-rt/src/asm.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/riscv-rt/CHANGELOG.md b/riscv-rt/CHANGELOG.md index 7fcaa107..56866394 100644 --- a/riscv-rt/CHANGELOG.md +++ b/riscv-rt/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Moved all the assembly code to `asm.rs` - Use `weak` symbols for functions such as `_mp_hook` or `_start_trap` +- `abort` is now `weak`, so it is possible to link third-party libraries including this symbol. ### Removed diff --git a/riscv-rt/src/asm.rs b/riscv-rt/src/asm.rs index 12a13927..1aa962b3 100644 --- a/riscv-rt/src/asm.rs +++ b/riscv-rt/src/asm.rs @@ -337,7 +337,7 @@ trap_handler!( #[rustfmt::skip] global_asm!( ".section .text.abort - .global abort +.weak abort abort: // make sure there is an abort symbol when linking j abort" );