Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Undefined reference to rust_begin_unwind #3

Closed
phil-opp opened this issue Jun 1, 2018 · 2 comments
Closed

Undefined reference to rust_begin_unwind #3

phil-opp opened this issue Jun 1, 2018 · 2 comments

Comments

@phil-opp
Copy link

phil-opp commented Jun 1, 2018

When using this crate together with the allocator example of cortex_m_quickstart I get the following linker error:

note: /home/philipp/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabihf/lib/libcore-ff2a90084abf53b1.rlib(core-ff2a90084abf53b1.core10-b3f31ca470b010e69733139f71d95864.rs.rcgu.o): In function `core::panicking::panic_fmt::hed27deb097b8209d':
          /checkout/src/libcore/panicking.rs:71: undefined reference to `rust_begin_unwind'

I tried to make the panic_fmt function in this crate public and no_mangle as suggested by rust-lang/rust#38281 (comment), but it didn't help.

It works if I copy the panic implementation with pub and no_mangle to my main.rs.

Rust version: rustc 1.28.0-nightly (5d0631a64 2018-05-30)

@japaric
Copy link
Member

japaric commented Jul 3, 2018

This is bug rust-lang/rust#51647 caused, I think, by the new oom lang item.

@japaric
Copy link
Member

japaric commented Aug 28, 2018

I believe this has been fixed upstream.

@japaric japaric closed this as completed Aug 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants