]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: 64bit FSP FV map file cannot be created correctly
authorKuo, Ted <ted.kuo@intel.com>
Mon, 29 Aug 2022 09:28:17 +0000 (17:28 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 15 Sep 2022 07:04:50 +0000 (07:04 +0000)
https://bugzilla.tianocore.org/show_bug.cgi?id=4035
64bit FSP FV map file cannot be created correctly when using CLANG
compiler. When compiling 64bit FSP with CLANG, there is no prefix
symbol '_' added to function name. Hence FSP FV map file cannot be
created properly. Updated the if condition for CLANG in GenFv to
get the issue fixed.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Lee Hamel <lee.m.hamel@intel.com>
Signed-off-by: Ted Kuo <ted.kuo@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
BaseTools/Source/C/GenFv/GenFvInternalLib.c

index d650a527a5af1eac220c70fdb28dd3833927e2c5..d28ac8f6eb77be8c813a38c1d6bd3ac714383693 100644 (file)
@@ -1004,7 +1004,7 @@ Returns:
       if (IsUseClang) {\r
         sscanf (Line, "%llx %s %s %s", &TempLongAddress, KeyWord, KeyWord2, FunctionTypeName);\r
         FunctionAddress = (UINT64) TempLongAddress;\r
-        if (FunctionTypeName [0] == '_' ) {\r
+        if (FunctionTypeName [0] != '/' && FunctionTypeName [0] != '.' && FunctionTypeName [1] != ':') {\r
           fprintf (FvMapFile, "  0x%010llx    ", (unsigned long long) (ImageBaseAddress + FunctionAddress - LinkTimeBaseAddress));\r
           fprintf (FvMapFile, "%s\n", FunctionTypeName);\r
         }\r