-
Notifications
You must be signed in to change notification settings - Fork 84
Conversation
r? @therealprof (rust-highfive has picked a reviewer for you, use r? to override) |
Just curious, why do we need these sections at all then on a real OS? Can't we just generally omit them if we have a |
We don't need to emit any link sections on non-cortex-m platforms, which is what this PR does except for the macro crate. Do you have a better cfg match in mind for the macro crate? I'd just left it as |
Ah, I was just looking at the Would |
|
Previously we always emitted link_section, even though it only had an effect when our linker script was being used (and only made sense on cortex-m targets). This breaks building the code for a MacOS target, which is occasionally useful for running `cargo check` etc. In the macros crate we don't have the target information available, so instead we continue to emit link_section except specifically on MacOS.
Yep, that seems to be working in my quick test (still places HardFault immediately after HardFaultTrampoline, while using target_os=dummy places it beforehand in with the other functions). Updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Previously we always emitted
link_section
, even though it only had aneffect when our linker script was being used (and only made sense on
cortex-m targets). This breaks building the code for a MacOS target,
which is occasionally useful for running
cargo check
etc.In the macros crate we don't have the target information available, so
instead we continue to emit
link_section
except specifically on MacOS.This keeps the fix from #306 but hopefully resolves the confusion in #74 (comment).