Special behaviour for _Dmodule_ref and _d_run_main?

kinke kinke at gmx.net
Mon May 11 15:25:24 UTC 2020


On Monday, 11 May 2020 at 13:29:51 UTC, Denis Feklushkin wrote:
> It's good. I tried define some external(C) symbol near of 
> _Dmodule_ref and then use it from main() - linking with this 
> symbol works ok. So, this problem only with "hidden"  calls 
> invoked by compiler.

_d_run_main isn't invoked by magic compiler code. - What linker 
are you using (linker, not gcc linker driver)? We default to gold 
(-linker=gold) for Linux because there have been numerous LTO 
issues with default bfd in the past (and the LLVM plugin is 
(primarily?) for gold, not bfd).


More information about the digitalmars-d-ldc mailing list