Hello Sergey,

 

Thanks. It is pretty close. All the 8-bit ones are fixed, but the 16-bit ones 
still fail:

 

d:\uefi\buildtest-016\edk2\Build\OvmfX64\DEBUG_GCC49\X64\ShellPkg\Application\Shell\Shell\DEBUG\AutoGen.c:196:44:
 note: previously declared here

GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 
_gPcd_FixedAtBuild_PcdShellSupplier[7] = {69, 68, 75, 32, 73, 73, 0 };

 

d:\uefi\buildtest-016\edk2\Build\ArmPlatform\DEBUG_GCC49\AARCH64\EmbeddedPkg\Ebl\Ebl\DEBUG\AutoGen.c:278:15:
 note: previously declared here

GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 
_gPcd_FixedAtBuild_PcdFdtDevicePath[1] = {0 };

 

d:\uefi\buildtest-016\edk2\Build\ArmPlatform\RELEASE_GCC49\AARCH64\EmbeddedPkg\Ebl\Ebl\DEBUG\AutoGen.c:264:15:
 note: previously declared here

--strip-unneeded -R .eh_frame 
d:\uefi\buildtest-016\edk2\Build\ArmPlatform\RELEASE_GCC49\AARCH64\ArmPlatformPkg\Bds\Bds\DEBUG\ArmPlatformBds.dll

GLOBAL_REMOVE_IF_UNREFERENCED const UINT16 
_gPcd_FixedAtBuild_PcdFdtDevicePath[1] = {0 };

 

Thanks,

Scott

 

From: Sergey Isakov [mailto:[email protected]] 
Sent: Saturday, November 08, 2014 06:14 AM
To: [email protected]
Subject: Re: [edk2] Status of gcc link time optimization for EDK2 use

 

Did you like my workaround? :)

GenC.py:

———

@@ -1077,6 +1071,9 @@ def CreateLibraryPcdCode(Info, AutoGenC,

     if PcdItemType == TAB_PCDS_FIXED_AT_BUILD or PcdItemType == 
TAB_PCDS_FEATURE_FLAG:

         key = ".".join((Pcd.TokenSpaceGuidCName,Pcd.TokenCName))

         

+        if DatumType == 'VOID*' and Array == '[]':

+          AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' 
%('UINT8', TokenCName, Array))

+        else:

         AutoGenH.Append('extern const %s _gPcd_FixedAtBuild_%s%s;\n' 
%(DatumType, TokenCName, Array))

         AutoGenH.Append('#define %s  %s_gPcd_FixedAtBuild_%s\n' %(GetModeName, 
Type, TokenCName))

         AutoGenH.Append('//#define %s  ASSERT(FALSE)  // It is not allowed to 
set value for a FIXED_AT_BUILD PCD\n' % SetModeName)

———

Now LTO works fine.

 

 

On 08 нояб. 2014 г., at 13:29, Sergey Isakov <[email protected] 
<mailto:[email protected]> > wrote:





Declaration VOID* is wrong initially. It comes from IntelFrameworkModulePkg.dec

——

[PcdsFixedAtBuild, PcdsPatchableInModule]

  ## FFS filename to find the default BMP Logo file.

  # @Prompt FFS Name of Boot Logo File

  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile |{ 0x99, 0x8b, 0xB2, 
0x7B, 0xBB, 0x61, 0xD5, 0x11, 0x9A, 0x5D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D 
}|VOID*|0x40000003

 

  ## FFS filename to find the shell application.

  # @Prompt FFS Name of Shell Application

  gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdShellFile|{ 0xB7, 0xD6, 0x7A, 
0xC5, 0x15, 0x05, 0xA8, 0x40, 0x9D, 0x21, 0x55, 0x16, 0x52, 0x85, 0x4E, 0x37 
}|VOID*|0x40000004

 

———

Really these are GUIDs and must be initialized other way, not here.

 

Sergey

 

On 08 нояб. 2014 г., at 10:50, Sergey Isakov <[email protected] 
<mailto:[email protected]> > wrote:





 

On 08 нояб. 2014 г., at 0:08, Scott Duplichan <[email protected] 
<mailto:[email protected]> > wrote:






AutoGen.h:50:20: warning:
type of '_gPcd_FixedAtBuild_PcdShellFile' does not match original declaration
extern const VOID* _gPcd_FixedAtBuild_PcdShellFile[];

AutoGen.c:277:43: note: previously declared here
GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gPcd_FixedAtBuild_PcdShellFile[16] =
{ 0x83, 0xA5, 0x04, 0x7C, 0x3E, 0x9E, 0x1C, 0x4F, 0xAD, 0x65, 0xE0, 0x52, 0x68, 
0xD0, 0xB4, 0xD1 };

 

I also encounter this.  And PcdLogoFile

Is there any workaround for this.?

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected] <mailto:[email protected]> 
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected] <mailto:[email protected]> 
https://lists.sourceforge.net/lists/listinfo/edk2-devel

 

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to