Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-07 Thread Kinney, Michael D
k <ler...@redhat.com>; Jeff Fan <jeff@intel.com> > Subject: Re: [edk2] [Patch] > SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate > symbol > > On 7 December 2017 at 07:48, Liming Gao > <liming@intel.com> wrote: > > From: Michael Kinney <

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-07 Thread Ard Biesheuvel
.com>; Wu, Hao A >> <hao.a...@intel.com>; Andrew Fish <af...@apple.com>; Jeff Fan >> <jeff....@intel.com> >> Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix >> duplicate symbol >> >> On 7 December 2017 at 11:18, L

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-07 Thread Gao, Liming
edhat.com> > Cc: Gao, Liming <liming@intel.com>; edk2-devel@lists.01.org; Kinney, > Michael D <michael.d.kin...@intel.com>; Wu, Hao A > <hao.a...@intel.com>; Andrew Fish <af...@apple.com>; Jeff Fan > <jeff@intel.com> > Subject: Re: [edk2] [P

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-07 Thread Ard Biesheuvel
On 7 December 2017 at 11:18, Laszlo Ersek wrote: > On 12/07/17 09:46, Ard Biesheuvel wrote: >> On 7 December 2017 at 07:48, Liming Gao wrote: >>> From: Michael Kinney >>> >>> https://bugzilla.tianocore.org/show_bug.cgi?id=573

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-07 Thread Laszlo Ersek
On 12/07/17 09:46, Ard Biesheuvel wrote: > On 7 December 2017 at 07:48, Liming Gao wrote: >> From: Michael Kinney >> >> https://bugzilla.tianocore.org/show_bug.cgi?id=573 >> https://bugzilla.tianocore.org/show_bug.cgi?id=796 >> >> The same issue

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-07 Thread Ard Biesheuvel
On 7 December 2017 at 07:48, Liming Gao wrote: > From: Michael Kinney > > https://bugzilla.tianocore.org/show_bug.cgi?id=573 > https://bugzilla.tianocore.org/show_bug.cgi?id=796 > > The same issue is reported again by GCC. Resend this patch

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-07 Thread Wu, Hao A
ael D; Wu, Hao A; Laszlo Ersek; Andrew Fish; Jeff Fan > Subject: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix > duplicate symbol > > From: Michael Kinney <michael.d.kin...@intel.com> > > https://bugzilla.tianocore.org/show_bug.cgi?id=573 > https://bugzi

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-12-06 Thread Ni, Ruiyu
On 12/7/2017 3:48 PM, Liming Gao wrote: From: Michael Kinney https://bugzilla.tianocore.org/show_bug.cgi?id=573 https://bugzilla.tianocore.org/show_bug.cgi?id=796 The same issue is reported again by GCC. Resend this patch again. This patch renames the duplicated

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-29 Thread Laszlo Ersek
On 05/27/17 14:27, Ard Biesheuvel wrote: > On 26 May 2017 at 23:06, Kinney, Michael D wrote: >> Felix, >> >> Yes. I agree. I will work on a Bugzilla issue for this topic >> and I prefer the idea of updating Base.h to check _MSC_VER value. >> >> The one challenge is

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-27 Thread Ard Biesheuvel
On 26 May 2017 at 23:06, Kinney, Michael D wrote: > Felix, > > Yes. I agree. I will work on a Bugzilla issue for this topic > and I prefer the idea of updating Base.h to check _MSC_VER value. > > The one challenge is that 'static' could be added in front of >

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-26 Thread Kinney, Michael D
chael.d.kin...@intel.com>; af...@apple.com; Laszlo Ersek > <ler...@redhat.com> > Cc: Wu, Hao A <hao.a...@intel.com>; edk2-devel@lists.01.org; Fan, Jeff > <jeff@intel.com>; Ard Biesheuvel <ard.biesheu...@linaro.org> > Subject: RE: [edk2] [Patch] SourceLevelDe

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-26 Thread Felix Poludov
vel@lists.01.org; Fan, Jeff; Felix Poludov; Ard Biesheuvel Subject: RE: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol Mike: Yes. /Gw option is added since VS2013. The older VS version can't use this option. I suggest we always define GLOBAL_REMOVE_IF_UNREFEREN

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-26 Thread Laszlo Ersek
rd Biesheuvel >> <ard.biesheu...@linaro.org>; Andrew Fish (af...@apple.com) >> <af...@apple.com>; Kinney, Michael D <michael.d.kin...@intel.com> >> Cc: Wu, Hao A <hao.a...@intel.com>; edk2-devel@lists.01.org; Fan, Jeff >> <jeff....@intel.com&g

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-26 Thread Gao, Liming
om>; edk2-devel@lists.01.org; Fan, Jeff ><jeff@intel.com>; Felix Poludov <fel...@ami.com>; Ard Biesheuvel ><ard.biesheu...@linaro.org> >Subject: RE: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix >duplicate symbol > >Liming, > >I agree w

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-26 Thread Kinney, Michael D
;; edk2-devel@lists.01.org; Fan, Jeff > <jeff@intel.com>; Felix Poludov <fel...@ami.com>; Ard Biesheuvel > <ard.biesheu...@linaro.org> > Subject: RE: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix > duplicate symbol > > Mike: > I remember communi

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Gao, Liming
A <hao.a...@intel.com>; edk2-devel@lists.01.org; Fan, Jeff ><jeff@intel.com> >Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix >duplicate symbol > >Laszlo, > >The other idea I have is for MSFT tool chains to do the DLINK step twice. Once

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Gao, Liming
v <fel...@ami.com>; Ard Biesheuvel ><ard.biesheu...@linaro.org> >Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix >duplicate symbol > >Andrew, > >The VS compilers available when GLOBAL_REMOVE_IF_UNREFERENCED was >added referred to __declsp

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Kinney, Michael D
> To: Kinney, Michael D <michael.d.kin...@intel.com>; Ard Biesheuvel > <ard.biesheu...@linaro.org>; Andrew Fish (af...@apple.com) <af...@apple.com> > Cc: Wu, Hao A <hao.a...@intel.com>; edk2-devel@lists.01.org; Fan, Jeff > <jeff@intel.com> > Subject: Re: [e

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Kinney, Michael D
ichael D <michael.d.kin...@intel.com>; Fan, Jeff <jeff....@intel.com> Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol On May 25, 2017, at 2:02 PM, Laszlo Ersek <ler...@redhat.com<mailto:ler...@redhat.com>> wrote: On 05/25/17 22:37, A

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Andrew Fish
> On May 25, 2017, at 2:02 PM, Laszlo Ersek wrote: > > On 05/25/17 22:37, Andrew Fish wrote: >> >>> On May 25, 2017, at 1:28 PM, Laszlo Ersek wrote: >>> >>> On 05/25/17 22:11, Ard Biesheuvel wrote: On 25 May 2017 at 13:06, Kinney, Michael D

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Laszlo Ersek
On 05/25/17 22:37, Andrew Fish wrote: > >> On May 25, 2017, at 1:28 PM, Laszlo Ersek wrote: >> >> On 05/25/17 22:11, Ard Biesheuvel wrote: >>> On 25 May 2017 at 13:06, Kinney, Michael D >>> wrote: Laszlo and Andrew, With the

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Andrew Fish
> On May 25, 2017, at 1:28 PM, Laszlo Ersek wrote: > > On 05/25/17 22:11, Ard Biesheuvel wrote: >> On 25 May 2017 at 13:06, Kinney, Michael D >> wrote: >>> Laszlo and Andrew, >>> >>> With the information that has been collected on this thread, I

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Laszlo Ersek
On 05/25/17 22:11, Ard Biesheuvel wrote: > On 25 May 2017 at 13:06, Kinney, Michael D wrote: >> Laszlo and Andrew, >> >> With the information that has been collected on this thread, I >> still think this patch in its original form is a good change >> to resolve the

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Ard Biesheuvel
On 25 May 2017 at 13:06, Kinney, Michael D wrote: > Laszlo and Andrew, > > With the information that has been collected on this thread, I > still think this patch in its original form is a good change > to resolve the this one specific duplicate symbol issue for all >

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Laszlo Ersek
On 05/25/17 21:57, Kinney, Michael D wrote: > Laszlo, > > I have the same concern on final image sizes. I have done some > evaluation: > > GCC5 OVMF X64 DEBUG without -whole-archive > == > FV Space Information > SECFV [19%Full] 212992 total, 42000 used,

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Kinney, Michael D
.com>; Kinney, Michael D > <michael.d.kin...@intel.com>; Laszlo Ersek <ler...@redhat.com>; Andrew Fish > <af...@apple.com> > Subject: RE: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix > duplicate symbol > > Reviewed-by: Jeff Fan <jeff@intel.co

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Laszlo Ersek
On 05/25/17 21:55, Ard Biesheuvel wrote: > On 25 May 2017 at 11:06, Laszlo Ersek wrote: >> On 05/25/17 19:38, Kinney, Michael D wrote: >>> Laszlo, >>> >>> I think the equivalent flag for GCC builds is --whole-archive. >>> >>> I tried adding that flag to DLINK_FLAGS in GCC5, and

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Kinney, Michael D
me issue. > > Thanks! > Laszlo > > >> -Original Message- > >> From: Laszlo Ersek [mailto:ler...@redhat.com] > >> Sent: Thursday, May 25, 2017 9:09 AM > >> To: Kinney, Michael D <michael.d.kin...@intel.com>; Ard Biesheuvel > >>

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Ard Biesheuvel
;; Ard Biesheuvel >>> <ard.biesheu...@linaro.org>; Andrew Fish (af...@apple.com) <af...@apple.com> >>> Cc: Wu, Hao A <hao.a...@intel.com>; edk2-devel@lists.01.org; Fan, Jeff >>> <jeff@intel.com> >>> Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecP

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Laszlo Ersek
>; Andrew Fish (af...@apple.com) <af...@apple.com> >> Cc: Wu, Hao A <hao.a...@intel.com>; edk2-devel@lists.01.org; Fan, Jeff >> <jeff@intel.com> >> Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix >> duplicate >> symb

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Kinney, Michael D
ndrew Fish (af...@apple.com) <af...@apple.com> > Cc: Wu, Hao A <hao.a...@intel.com>; edk2-devel@lists.01.org; Fan, Jeff > <jeff@intel.com> > Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix > duplicate > symbol > > On 05/25/17 03:47,

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Andrew Fish
> On May 25, 2017, at 9:08 AM, Laszlo Ersek wrote: > > On 05/25/17 03:47, Kinney, Michael D wrote: >> Andrew, >> >> I think I have found an alternate fix for this XCODE5 specific >> build failure. Since there appears to be a difference in the >> linker behavior between

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Laszlo Ersek
On 05/25/17 03:47, Kinney, Michael D wrote: > Andrew, > > I think I have found an alternate fix for this XCODE5 specific > build failure. Since there appears to be a difference in the > linker behavior between MSFT/GCC/XCODE tool chains, I reviewed > the 'ld' command line options used in

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-25 Thread Laszlo Ersek
On 05/24/17 22:18, Kinney, Michael D wrote: > Laszlo, > > I agree with the request to add 'static' to the variable declaration > in the SecPeiDebugAgentLib. The variable name change will be retained > because the same symbol name can still be confusing when debugging. > > The part that is more

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-24 Thread Kinney, Michael D
f...@apple.com; Fan, Jeff <jeff@intel.com> > Subject: RE: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix > duplicate > symbol > > Ard, > > I agree that it would be good practice for a library instance to > only have the public interfaces(functions/dat

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-24 Thread Kinney, Michael D
y, Michael D <michael.d.kin...@intel.com> > Cc: Laszlo Ersek <ler...@redhat.com>; Wu, Hao A <hao.a...@intel.com>; edk2- > de...@lists.01.org; af...@apple.com; Fan, Jeff <jeff@intel.com> > Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix >

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-24 Thread Ard Biesheuvel
On 24 May 2017 at 13:18, Kinney, Michael D wrote: > Laszlo, > > I agree with the request to add 'static' to the variable declaration > in the SecPeiDebugAgentLib. The variable name change will be retained > because the same symbol name can still be confusing when

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-24 Thread Kinney, Michael D
gt; Subject: Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix > duplicate > symbol > > On 24 May 2017 at 01:48, Laszlo Ersek <ler...@redhat.com> wrote: > > CC Ard > > > > On 05/24/17 02:27, Kinney, Michael D wrote: > >> Andrew, > >>

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-24 Thread Ard Biesheuvel
On 24 May 2017 at 01:48, Laszlo Ersek wrote: > CC Ard > > On 05/24/17 02:27, Kinney, Michael D wrote: >> Andrew, >> >> I agree in this specific case, making the global variable static >> should also resolve this issue. >> >> In general, we do not make module global variables

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-24 Thread Laszlo Ersek
CC Ard On 05/24/17 02:27, Kinney, Michael D wrote: > Andrew, > > I agree in this specific case, making the global variable static > should also resolve this issue. > > In general, we do not make module global variables static, so the > module global can be shared across multiple source files in

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-23 Thread Fan, Jeff
, Jeff Subject: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol https://bugzilla.tianocore.org/show_bug.cgi?id=573 The SecPeiDebugAgentLib uses the global variable mMemoryDiscoveredNotifyList for a PPI notification on the Memory Discovered PPI. This same variabl

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-23 Thread Kinney, Michael D
Andrew, I agree in this specific case, making the global variable static should also resolve this issue. In general, we do not make module global variables static, so the module global can be shared across multiple source files in the module implementation. Not sure why this issue has not

Re: [edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-23 Thread Andrew Fish
Mike, Do the other compilers promote (or is that demote) to static? Would not making these lib globals, and private functions static solve this class of issue? Thanks, Andrew Fish > On May 23, 2017, at 4:21 PM, Michael Kinney > wrote: > >

[edk2] [Patch] SourceLevelDebugPkg/SecPeiDebugAgentLib: Fix duplicate symbol

2017-05-23 Thread Michael Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=573 The SecPeiDebugAgentLib uses the global variable mMemoryDiscoveredNotifyList for a PPI notification on the Memory Discovered PPI. This same variable name is used in the DxeIplPeim for the same PPI notification. The XCODE5 tool chain detects