-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Symbol mangling happens despite #[no_mangle] or #[link_name] #35052
Copy link
Copy link
Closed
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-macosOperating system: macOSOperating system: macOST-langRelevant to the language teamRelevant to the language team
Metadata
Metadata
Assignees
Labels
A-linkageArea: linking into static, shared libraries and binariesArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.O-macosOperating system: macOSOperating system: macOST-langRelevant to the language teamRelevant to the language team
Type
Fields
Give feedbackNo fields configured for issues without a type.
I see symbols being mangled despite using
#[no_mangle]or#[link_name = "foo"]. Specifically, the symbols are being prepended by_, i.e.foogets mangled to_foorather than being accessible asfoo.I tried this code:
and
Meta
OS:
OS X 10.10rustc --version --verbose: I tried bothrustc 1.10.0 (cfcb716cf 2016-07-03) binary: rustc commit-hash: cfcb716cf0961a7e3a4eceac828d94805cf8140b commit-date: 2016-07-03 host: x86_64-apple-darwin release: 1.10.0and
rustc 1.12.0-nightly (9316ae515 2016-07-24) binary: rustc commit-hash: 9316ae515e2f8f3f497fb4f1559910c1eef2433d commit-date: 2016-07-24 host: x86_64-apple-darwin release: 1.12.0-nightly