Suppose my code have an internal function, which is not exported, not available for public in any other way (say, a thread function for CreateThread
). If I compile my application with C++ Builder (using 10.4 Sydney with classic compiler) - then I can check (via .map
file) that my function will lose its name and will be named something like _16386
. It always starts with _
followed by some integer. Another example are names like C3304_3
, D304_0
, B09
.
This is not specific to my functions. Same is true for internal (non-published) RTL functions.
This is not mangling. Mangling is a way to decorate name with type information. For example: @Winapi@Commctrl@initialization$qqrv
. This is a completely different thing. Additionally, "Map with mangled names" option is set to False. If I set it to True - mangled version for _16386
will become something like @Winapi@Commctrl@_16386
.
It is certainly not a problem for typical application runs, because there are no references to that function via its name. However, if I am going to use something like exception tracer tool (or even MS Process Explorer - assuming that I will convert C++ Builder symbols into MS DBG format) - this tool will use produced symbols/debug info and will show me the _16386
name. And I have no idea what code this name refers to!
Why does compiler/linker do that? Is there any way to stop it doing so?
P.S. All tests run with the default Debug
profile, which means "Disable all optimizations" and "Full debug info" options are enabled.