Ard, If there is a concern about the size impact, we can add an extra Link step that uses --whole-archive to check for duplicate symbols, but the link step used to generate final image would not use --whole-archive.
Mike > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On > Behalf Of Gao, Liming > Sent: Tuesday, August 29, 2017 12:41 AM > To: Ard Biesheuvel <ard.biesheu...@linaro.org> > Cc: edk2-devel@lists.01.org; Laszlo Ersek <ler...@redhat.com> > Subject: Re: [edk2] [Patch] BaseTools: Enable --whole-archive > in GCC tool chain as the default option > > Ard: > This is the compiler check option, not debug option. I > suggest to add it for all configuration. > > Thanks > Liming > >-----Original Message----- > >From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > >Sent: Tuesday, August 29, 2017 12:59 AM > >To: Gao, Liming <liming....@intel.com> > >Cc: Laszlo Ersek <ler...@redhat.com>; edk2-devel@lists.01.org > >Subject: Re: [edk2] [Patch] BaseTools: Enable --whole-archive > in GCC tool > >chain as the default option > > > >On 28 August 2017 at 04:27, Gao, Liming <liming....@intel.com> > wrote: > >> Laszlo: > >> I will update the patch with your comments. > >> > >> Ard: > >> We collect the size impact in Ovmf platform. Its impact is > small. So, my > >patch enable this option for all targets. Below is the data > collected on > >OvmfIa32X64.dsc with GCC5 tool chain. Raw image is a little > bigger. But, the > >compressed size is a little smaller. > >> > >> PEIFV 178472 --> 179176 +704 (Bytes) > >> DXEFV 4062512 --> 4075056 +12544 (Bytes) > >> FVMAIN_COMPACT 1190896 --> 1184920 -5976 (Bytes) > >> > > > >I don't care deeply, but given that --whole-archive is used as > a debug > >feature (we don't actually need the whole archive, but we want > to > >force a linker error if duplicate symbols exist), I don't > think it > >belongs in the RELEASE configuration. > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel