dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.41k stars 197 forks source link

[NativeAOT-LLVM] Blank app pulls in 50K+ bytes of Itanium demangler code #2511

Closed SingleAccretion closed 7 months ago

SingleAccretion commented 8 months ago

Reproduction: 1) Build the WasmDebugging test (as an example of a hello world app) for Browser. 2) wasm-objdump -j Code -x WasmDebugging.wasm

Observe a bunch of ::itanium_demangle:: functions being pulled in by __cxa_demangle (which is ultimately an export).

A quick estimate shows their size to add up to 62K (!) of code, and it's totally useless, because the names are already stored demangled in the names section, and because we don't use C++ EH.