Is there a way to change the symbol name of the Rust std library to V0

The default mangle name rule used by the Rust std library is legacy. How can I change it to V0.

readelf -sW

Symbol table '.dynsym' contains 1720 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
    171: 00000000000a83a0    22 FUNC    GLOBAL DEFAULT   12 _ZN3std3net3udp9UdpSocket9peek_from17h0fdef50c6a94bf95E


The v0 rule is introduced here:

If you're building the toolchain yourself, you can set in config.toml:

new-symbol-mangling = true
1 Like