Skip to content

-Zexport-executable-symbols alone does not export symbols #101610

Closed
@yshui

Description

@yshui

I tried:

#[no_mangle]
pub fn exported() {}

building with:

rustc -Zexport-executable-symbols --crate-type bin

I expected to see this happen:

`exported` is in the list of dynamic symbols

Instead, this happened:

no symbol is exported

in addition, this test case here:

nm $(TMPDIR)/main | $(CGREP) exported_symbol

is insufficient, as nm prints out every symbol, not only the exported ones.

Meta

Tested on:

  • rustc 1.65.0-nightly (c07a8b4e0 2022-08-26)
  • rustc 1.65.0-nightly (c2804e6ec 2022-09-07)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.F-export_executable_symbols`#![feature(export_executable_symbols)]`T-compilerRelevant to the compiler 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