Skip to content

riscv-rt: Duplicate symbol when linking with Newlib #197

@gmmyung

Description

@gmmyung

Hi, I am trying to use a C library that depends on Newlib with rust. This code block seems to generate the abort symbol, but this collides with the libc abort() symbol. Is it possible for the riscv-rt crate to change the name of the symbol to something else?

riscv/riscv-rt/src/asm.rs

Lines 337 to 343 in 27c4faf

#[rustfmt::skip]
global_asm!(
".section .text.abort
.global abort
abort: // make sure there is an abort symbol when linking
j abort"
);

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