From 45297e6c9bd1be53b3c462adb9b37b4df2ea8681 Mon Sep 17 00:00:00 2001 From: "Kuo, Ted" Date: Mon, 29 Aug 2022 17:28:17 +0800 Subject: 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 Cc: Liming Gao Cc: Yuwei Chen Cc: Lee Hamel Signed-off-by: Ted Kuo Reviewed-by: Bob Feng --- BaseTools/Source/C/GenFv/GenFvInternalLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'BaseTools/Source') diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c index d650a52..d28ac8f 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); } -- cgit v1.1