Comments (4)
Hi sp3d,
Very cool finding ! May I ask you to share a minimal sample code to reproduce ? I'm unsure if demangling in rust follows the same rules as in cpp. If so, should be not too hard to fix :)
from wcc.
This happens even with a hello-world compiled with rustc:
fn main() {println!("Hello, world!")}
Rust symbol-mangling rules aren't stable or formally specified, but roughly coincide with C++ mangling. The implementation lives here: https://github.com/rust-lang/rust/blob/master/src/librustc_trans/back/symbol_names.rs
from wcc.
Hi sp3d,
Do you happen to know if I may demangle rust symbols using libiberty ?
Thanks and regards,
j-
from wcc.
Rust has an old "legacy" mangling scheme that mostly follows C++ rules, and a new scheme that works much better for the needs of Rust symbols. Both are supported by the rustc-demangle crate.
That said, it may be easiest for now to simply make wsh escape symbols somehow so that it doesn't rely on being able to demangle them. Binaries created by more arcane toolchains (e.g. malware) are likely to have unprintable and undemangleable symbol names, for example.
from wcc.
Related Issues (20)
- cool! HOT 1
- Build problems; suggestions for the Readme HOT 3
- wsh segfaulting on startup HOT 2
- Example usage of WSH under QEMU user-space emulation? HOT 8
- Ubuntu build issue HOT 1
- wsh/scripts/INDEX requires file `hashing` but this is missing HOT 1
- Segmentation fault upon running wsh HOT 26
- Segfault attempting to run wcc on libvivoxsdk.so HOT 1
- lua submodule ref missing HOT 3
- Support for MachO HOT 6
- Not an issue but a thank you... HOT 1
- Autotools support
- Undefined symbols when running 'wsh'. HOT 2
- ARM Compilation broken HOT 1
- ls.so: ELF file's phentsize not the expected size HOT 3
- Linking troubles when building HOT 8
- Demangled symbols aren't displayed/made accessible HOT 1
- README.md: Dead links HOT 1
- conditional return in void function causes wcc to expect the function to end HOT 4
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 wcc.