Skip to content

funcs::posix::fcntl::open from libc magically becomes a public symbol #26640

Closed
@Tobba

Description

@Tobba

Minimal test case:

#![feature(no_std, lang_items, core, libc)]
#![no_std]

extern crate core;
extern crate libc;

use core::fmt;

#[lang="panic_fmt"]
extern fn panic_fmt(msg: &fmt::Arguments, file: &'static str, line: u32) -> ! {
        loop { }
}

#[lang="stack_exhausted"]
extern fn stack_exhausted() {
        loop { }
}

#[lang="eh_personality"]
extern fn eh_personality() {
        loop { }
}

Compile with:

rustc --crate-type staticlib lib.rs -C lto --emit asm -C opt-level=2

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions