Strip Unused Symbols Ldc + Windows

SrMordred patric.dexheimer at
Sat Mar 21 17:33:21 UTC 2020

On Saturday, 21 March 2020 at 15:53:53 UTC, kinke wrote:
> On Saturday, 21 March 2020 at 01:54:00 UTC, SrMordred wrote:
>> Someone knows how to strip unused symbols on final binary 
>> using ldc on windows ?
>> i found this about this topic:
>> that uses --gc-sections and --version-script but this options 
>> are not avaliable in windows lld-link
> That was about ELF symbol visibility and doesn't apply to 
> Windows at all. - The symbols are stripped by default for 
> Windows targets (/OPT:REF for MS linker/LLD). You can 
> cross-check by disabling via `-disable-linker-strip-dead`.

Hmm, ok, my question is in fact relate to this kind of thing:

Why int example.add(int, int): its still on the binary when all u 
need is alredy optimized to
  mov     eax, 30


More information about the Digitalmars-d-learn mailing list