BaseTools/Source/C/GenFv/GenFvInternalLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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>
---
BaseTools/Source/C/GenFv/GenFvInternalLib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index d650a527a5..d28ac8f6eb 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -1004,7 +1004,7 @@ Returns:
if (IsUseClang) {
sscanf (Line, "%llx %s %s %s", &TempLongAddress, KeyWord, KeyWord2, FunctionTypeName);
FunctionAddress = (UINT64) TempLongAddress;
- if (FunctionTypeName [0] == '_' ) {
+ if (FunctionTypeName [0] != '/' && FunctionTypeName [0] != '.' && FunctionTypeName [1] != ':') {
fprintf (FvMapFile, " 0x%010llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress - LinkTimeBaseAddress));
fprintf (FvMapFile, "%s\n", FunctionTypeName);
}
--
2.35.3.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#92908): https://edk2.groups.io/g/devel/message/92908
Mute This Topic: https://groups.io/mt/93322647/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Bob Feng <bob.c.feng@intel.com> -----Original Message----- From: Kuo, Ted <ted.kuo@intel.com> Sent: Monday, August 29, 2022 5:28 PM To: devel@edk2.groups.io Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming <gaoliming@byosoft.com.cn>; Chen, Christine <yuwei.chen@intel.com>; Hamel, Lee M <lee.m.hamel@intel.com> Subject: [edk2-devel][PATCH v1] BaseTools: 64bit FSP FV map file cannot be created correctly 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> --- BaseTools/Source/C/GenFv/GenFvInternalLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c index d650a527a5..d28ac8f6eb 100644 --- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c +++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c @@ -1004,7 +1004,7 @@ Returns: if (IsUseClang) { sscanf (Line, "%llx %s %s %s", &TempLongAddress, KeyWord, KeyWord2, FunctionTypeName); FunctionAddress = (UINT64) TempLongAddress;- if (FunctionTypeName [0] == '_' ) {+ if (FunctionTypeName [0] != '/' && FunctionTypeName [0] != '.' && FunctionTypeName [1] != ':') { fprintf (FvMapFile, " 0x%010llx ", (unsigned long long) (ImageBaseAddress + FunctionAddress - LinkTimeBaseAddress)); fprintf (FvMapFile, "%s\n", FunctionTypeName); }-- 2.35.3.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#93684): https://edk2.groups.io/g/devel/message/93684 Mute This Topic: https://groups.io/mt/93322647/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.