From: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
To: devel@edk2.groups.io
Cc: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Subject: [PATCH] IntelFsp2Pkg/Tools: PatchFv: Handle 32-bit address in GCC map
Date: Wed, 31 May 2023 03:48:27 +0000 [thread overview]
Message-ID: <20230531034827.93847-1-jiaqing.zhao@linux.intel.com> (raw)
Some versions of ld (like 2.40 in Ubuntu 23.04) uses 32-bit address
when generating map files for IA32 build. This patch enables PatchFv.py
to parse these 32-bit addresses in GCC map properly.
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
---
IntelFsp2Pkg/Tools/PatchFv.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/IntelFsp2Pkg/Tools/PatchFv.py b/IntelFsp2Pkg/Tools/PatchFv.py
index 73ab877c71..2e60343180 100644
--- a/IntelFsp2Pkg/Tools/PatchFv.py
+++ b/IntelFsp2Pkg/Tools/PatchFv.py
@@ -432,7 +432,8 @@ class Symbols:
if reportLine.strip().find("Archive member included") != -1:
#GCC
# 0x0000000000001d55 IoRead8
- patchMapFileMatchString = "\s+(0x[0-9a-fA-F]{16})\s+([^\s][^0x][_a-zA-Z0-9\-]+)\s"
+ # 0x00001d55 IoRead8
+ patchMapFileMatchString = "\s+(0x[0-9a-fA-F]{8,16})\s+([^\s][^0x][_a-zA-Z0-9\-]+)\s"
matchKeyGroupIndex = 2
matchSymbolGroupIndex = 1
prefix = '_'
@@ -458,7 +459,7 @@ class Symbols:
if handleNext:
handleNext = False
pcdName = match.group(1)
- match = re.match("\s+(0x[0-9a-fA-F]{16})\s+", reportLine)
+ match = re.match("\s+(0x[0-9a-fA-F]{8,16})\s+", reportLine)
if match is not None:
modSymbols[prefix + pcdName] = match.group(1)
else:
--
2.39.2
reply other threads:[~2023-05-31 3:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230531034827.93847-1-jiaqing.zhao@linux.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox