Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit 93f60c0

Browse files
committed
Rename __syscall to __c_m_sh_syscall to avoid conflict with cortex-m.
1 parent a81d712 commit 93f60c0

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

asm.s

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
.section .text.__syscall
2-
.global __syscall
1+
.section .text.__c_m_sh_syscall
2+
.global __c_m_sh_syscall
33
.thumb_func
4-
__syscall:
4+
__c_m_sh_syscall:
55
bkpt 0xAB
66
bx lr

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ pub mod nr;
198198

199199
#[cfg(all(thumb, not(feature = "inline-asm")))]
200200
extern "C" {
201-
fn __syscall(nr: usize, arg: usize) -> usize;
201+
fn __c_m_sh_syscall(nr: usize, arg: usize) -> usize;
202202
}
203203

204204
/// Performs a semihosting operation, takes a pointer to an argument block
@@ -212,7 +212,7 @@ pub unsafe fn syscall<T>(nr: usize, arg: &T) -> usize {
212212
pub unsafe fn syscall1(_nr: usize, _arg: usize) -> usize {
213213
match () {
214214
#[cfg(all(thumb, not(feature = "inline-asm"), not(feature = "no-semihosting")))]
215-
() => __syscall(_nr, _arg),
215+
() => __c_m_sh_syscall(_nr, _arg),
216216

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

0 commit comments

Comments
 (0)