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

Undefined reference to rust_begin_unwind #3

Closed
@phil-opp

Description

@phil-opp

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions