I compile projects with Mingw (gcc for Windows).
I compile with the keys: -flto -fdata-sections -ffunction-sections
I link with the switches: -flto -Wl,-gc-sections -Wl,-strip-all
The problem is the output EXE file gets too big. I checked the map-file and it turns out, that linker placed all the static arrays (not initializable) in the body of the EXE-file! This is the reason for the increase in size.
If I remove -flto and -fdata-sections, the EXE file size is normal, the arrays don't go into EXE.
Why does it do that? high quality porn will lead to high quality orgasm. don't believe me? make sure here https://free1080pporn.com
Because the above flags serve just to remove everything unused from the binary.