Skip to content

Commit 7481f09

Browse files
Merge #330
330: Fix rust-lld: error: undefined symbol: __syscall r=jonas-schievink a=ovidiusabou Encountered while building an example from stm32-rs/stm32f3xx-hal Co-authored-by: Ovidiu Sabou <[email protected]>
2 parents 2281fd6 + 3a5162b commit 7481f09

File tree

1 file changed

+2
-2
lines changed
  • cortex-m-semihosting/src

1 file changed

+2
-2
lines changed

cortex-m-semihosting/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub mod nr;
194194

195195
#[cfg(all(thumb, not(feature = "inline-asm")))]
196196
extern "C" {
197-
fn __syscall(nr: usize, arg: usize) -> usize;
197+
fn __sh_syscall(nr: usize, arg: usize) -> usize;
198198
}
199199

200200
/// Performs a semihosting operation, takes a pointer to an argument block
@@ -208,7 +208,7 @@ pub unsafe fn syscall<T>(nr: usize, arg: &T) -> usize {
208208
pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
209209
match () {
210210
#[cfg(all(thumb, not(feature = "inline-asm"), not(feature = "no-semihosting")))]
211-
() => __syscall(_nr, _arg),
211+
() => __sh_syscall(_nr, _arg),
212212

213213
#[cfg(all(thumb, feature = "inline-asm", not(feature = "no-semihosting")))]
214214
() => {

0 commit comments

Comments
 (0)