Merge #38
38: stop recommending LLD r=japaric a=japaric until https://bugs.llvm.org/show_bug.cgi?id=38435 is fixed Co-authored-by: Jorge Aparicio <jorge@japaric.io>
This commit is contained in:
@@ -3,11 +3,6 @@ runner = 'arm-none-eabi-gdb'
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Wl,-Tlink.x",
|
||||
"-C", "link-arg=-nostartfiles",
|
||||
|
||||
# uncomment to use rustc LLD to link programs (a)
|
||||
# "-C", "link-arg=-Tlink.x",
|
||||
# "-C", "linker=lld",
|
||||
# "-Z", "linker-flavor=ld.lld",
|
||||
]
|
||||
|
||||
[target.thumbv7m-none-eabi]
|
||||
@@ -15,11 +10,6 @@ runner = 'arm-none-eabi-gdb'
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Wl,-Tlink.x",
|
||||
"-C", "link-arg=-nostartfiles",
|
||||
|
||||
# uncomment to use rustc LLD to link programs (a)
|
||||
# "-C", "link-arg=-Tlink.x",
|
||||
# "-C", "linker=lld",
|
||||
# "-Z", "linker-flavor=ld.lld",
|
||||
]
|
||||
|
||||
[target.thumbv7em-none-eabi]
|
||||
@@ -27,11 +17,6 @@ runner = 'arm-none-eabi-gdb'
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Wl,-Tlink.x",
|
||||
"-C", "link-arg=-nostartfiles",
|
||||
|
||||
# uncomment to use rustc LLD to link programs (a)
|
||||
# "-C", "link-arg=-Tlink.x",
|
||||
# "-C", "linker=lld",
|
||||
# "-Z", "linker-flavor=ld.lld",
|
||||
]
|
||||
|
||||
[target.thumbv7em-none-eabihf]
|
||||
@@ -39,12 +24,4 @@ runner = 'arm-none-eabi-gdb'
|
||||
rustflags = [
|
||||
"-C", "link-arg=-Wl,-Tlink.x",
|
||||
"-C", "link-arg=-nostartfiles",
|
||||
|
||||
# uncomment to use rustc LLD to link programs (a)
|
||||
# "-C", "link-arg=-Tlink.x",
|
||||
# "-C", "linker=lld",
|
||||
# "-Z", "linker-flavor=ld.lld",
|
||||
]
|
||||
|
||||
# (a) you also need to comment out the other two `link-arg` lines. But note that as of v0.6.0 LLD
|
||||
# has a bug where it mislinks FFI calls and they up crashing the program at runtime
|
||||
@@ -10,6 +10,7 @@
|
||||
//! ---
|
||||
|
||||
#![feature(alloc)]
|
||||
#![feature(alloc_error_handler)]
|
||||
#![feature(global_allocator)]
|
||||
#![feature(lang_items)]
|
||||
#![no_main]
|
||||
@@ -25,6 +26,7 @@ extern crate cortex_m_rt as rt;
|
||||
extern crate cortex_m_semihosting as sh;
|
||||
extern crate panic_semihosting;
|
||||
|
||||
use core::alloc::Layout;
|
||||
use core::fmt::Write;
|
||||
|
||||
use alloc_cortex_m::CortexMHeap;
|
||||
@@ -54,9 +56,9 @@ fn main() -> ! {
|
||||
}
|
||||
|
||||
// define what happens in an Out Of Memory (OOM) condition
|
||||
#[lang = "oom"]
|
||||
#[alloc_error_handler]
|
||||
#[no_mangle]
|
||||
pub fn rust_oom() -> ! {
|
||||
pub fn alloc_error(layout: Layout) -> ! {
|
||||
asm::bkpt();
|
||||
|
||||
loop {}
|
||||
|
||||
Reference in New Issue
Block a user