diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py index e8c3712a29..d0ae397f8c 100644 --- a/IntelFsp2Pkg/Tools/PatchFv.py +++ b/IntelFsp2Pkg/Tools/PatchFv.py @@ -384,6 +384,10 @@ class Symbols: if len(modName) == 36: modName = self.dictGuidNameXref[modName.upper()] self.dictModBase['%s:BASE' % modName] = int (match.group(2), 16) + + # Support pseudo symbol for image base: _IMAGE_BASE__ + self.dictVariable['_IMAGE_BASE_%s_' % modName] = int (match.group(2), 16) + self.dictModBase['%s:ENTRY' % modName] = int (match.group(3), 16) #(GUID=86D70125-BAA3-4296-A62F-602BEBBB9081 .textbaseaddress=0x00fffb4398 .databaseaddress=0x00fffb4178) match = re.match(r"\(GUID=([A-Z0-9\-]+)\s+\.textbaseaddress=(0x[0-9a-fA-F]+)\s+\.databaseaddress=(0x[0-9a-fA-F]+)\)", rptLine) @@ -490,8 +494,6 @@ class Symbols: if not fullSym in self.dictSymbolAddress: self.dictSymbolAddress[fullSym] = "0x00%08x" % (baseOffset+ int(modSymbols[symbol], 16)) - # Support pseudo symbol for image base: _IMAGE_BASE__ - self.dictVariable['_IMAGE_BASE_%s_' % moduleName] = self.dictModBase['%s:BASE' % moduleName] return 0 #