Skip to content

Commit 597d845

Browse files
committed
Specify the function type.
1 parent f6aedfa commit 597d845

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

src/generate.rs

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,16 +232,17 @@ pub fn interrupt(
232232
names.push(name_uc);
233233
}
234234

235-
let aliases = names.iter()
236-
.map(|n| format!("
237-
.weak {0}
238-
{0} = DEFAULT_HANDLER", n))
239-
.collect::<Vec<_>>()
240-
.concat();
241-
242235
let n = util::unsuffixed(u64(pos));
243236
match *target {
244237
Target::CortexM => {
238+
let aliases = names.iter()
239+
.map(|n| format!("
240+
.weak {0}
241+
.type {0},%function
242+
{0} = DEFAULT_HANDLER", n))
243+
.collect::<Vec<_>>()
244+
.concat();
245+
245246
mod_items.push(quote! {
246247
#[cfg(feature = "rt")]
247248
global_asm!(#aliases);
@@ -263,6 +264,14 @@ pub fn interrupt(
263264
});
264265
}
265266
Target::Msp430 => {
267+
let aliases = names.iter()
268+
.map(|n| format!("
269+
.weak {0}
270+
.type {0},@function
271+
{0} = DEFAULT_HANDLER", n))
272+
.collect::<Vec<_>>()
273+
.concat();
274+
266275
mod_items.push(quote! {
267276
#[cfg(feature = "rt")]
268277
global_asm!(#aliases);

0 commit comments

Comments
 (0)