Comments (4)
You need the unstable -Zexport-executable-symbols
to export symbols from an executable.
from rust.
here's the documentation that makes me believe this behavior is unintentional: https://doc.rust-lang.org/reference/abi.html
i ran into this problem when disassembling a program, but it could also cause issues for some dynamic libraries that expect the program that links against them to define some symbol for configuration.
workaround is to make sure that function is referenced from somewhere else in the program.
from rust.
The function is unused/dead code, so it's not being codegen'd (this has nothing to do with no_mangle
: it'd be the same for any function). Perhaps you want it to be pub
in a library crate?
from rust.
@lolbinarycat A close examination of the page you reference suggests its definition of "object file" excludes linked binaries, so this does seem to be "working as intended" currently, though the reference is confusingly written on this point.
from rust.
Related Issues (20)
- Doc for std contains broken links in the implementors sections HOT 3
- Japanese translation of Rust by Example is not built
- ICE when triggering a malformed `diagnostic::on_unimplemented` across crate boundaries (`DefId(20:3 ~ ice_lib_test[60d0]::Test)` isn't local) HOT 1
- Ludicrous build time for `keshvar` crate in `release` mode HOT 4
- Imports of legacy modules with numeric constants do not get flagged as unused when the corresponding type is used in the code HOT 1
- When using `Box<self>` in first method parameter, the error output provides the wrong type in help message HOT 1
- `IoSlice`: the `Deref` impl is too restrictive on the lifetime of the slice, an alternative is needed. HOT 1
- Trait coherency regression in 1.78 HOT 3
- Type inference not working well with ptr mutability HOT 2
- GetSystemTimePreciseAsFileTime HOT 3
- Subpar documentation for ptr-to-ref conversion methods
- Compiler Panics ,when I use Ractor Framework HOT 4
- 1.78.0 & WASM - panicked at dlmalloc.rs: assertion failed: psize <= size + max_overhead HOT 5
- False positives from invalid_reference_casting HOT 6
- Nested argument mismatch could suggest moving extra parameter outside parenthesis HOT 3
- Explain the difference between Once(Lock|Cell) and Lazy(Lock|Cell) in the docs HOT 2
- ICE: `Result::unwrap()` on an `Err` value: Sorts(ExpectedFound { ... } HOT 1
- rustfmt eats attributes in inline const blogs HOT 2
- Sometimes 'Σ' is not handled correctly in str.to_lowercase() HOT 2
- Compiler Crash with "Hello world" on latest nightly (aarch64) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.