Hello! I've been running some analysis on binaries/shared lib of my rust projects. If I look at the demangled symbol, i can see a lot of
XXXX is some integer number. Does someone know what is this integer? And why is there so many entries for apparently the same thing (ie:
core::ptr::drop_in_place in my example)
Ok i ended up finding https://github.com/rust-lang/rust/issues/60705
I will try that mangling scheme to see the differences :)
drop_in_place is the name used for drop shims/drop glue, which is the code that calls
Drop::drop and then recurses into fields when something is dropped.
Yep but i was wondering what was the .XXXX at the end. In the new mangling scheme, its waaay more detailed and most of those are now pointing to fully qualified "type name"
most of the symbols ending with a
.XXXXX integer are gone but some are still there like:
".text/<wirefilter::types::Type as core::clone::Clone>::clone.1885", ".text/<wirefilter::types::Type as core::clone::Clone>::clone.2457",
.text prefix being the section where the symbol is found)
True. It looks like shims have a special namespace in the new mangling scheme as well. Is v0 name mangling behind a flag?
Yes, i had to use nightly and add
[build] rustflags = "-Zsymbol-mangling-version=v0"
to my cargo config file
Hmm. Not sure then. eddyb would know, but I think they're not feeling well lately.
:o i hope he's ok :o