summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunhua Feng <fengyunhua@byosoft.com.cn>2020-11-09 16:08:01 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-11-10 04:22:27 +0000
commit76e8aac158b0717fa27f12e4d008f79161ddb050 (patch)
treefccb6ed3bf331fb637882e127ed8552e8a59830e
parentb96b44feab7aad2b9ae73a3602924b42d148bb03 (diff)
downloadedk2-76e8aac158b0717fa27f12e4d008f79161ddb050.tar.gz
edk2-76e8aac158b0717fa27f12e4d008f79161ddb050.tar.bz2
edk2-76e8aac158b0717fa27f12e4d008f79161ddb050.zip
BaseTools: Add image type into generate map file
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2977 For a source-level BIOS debugger the .map files are quite useful with one major shortcoming: the debugger cannot know, solely from the .map file, the format (PE/COFF vs. TE) of the image included in the final BIOS ROM Add Type=PE or TE in the map file Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Signed-off-by: Yunhua Feng <fengyunhua@byosoft.com.cn> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
-rw-r--r--BaseTools/Source/C/GenFv/GenFvInternalLib.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/BaseTools/Source/C/GenFv/GenFvInternalLib.c b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
index b5ffed93a9..6e296b8ad6 100644
--- a/BaseTools/Source/C/GenFv/GenFvInternalLib.c
+++ b/BaseTools/Source/C/GenFv/GenFvInternalLib.c
@@ -903,7 +903,12 @@ Returns:
fprintf (FvMapFile, "BaseAddress=0x%010llx, ", (unsigned long long) (ImageBaseAddress + Offset));
}
- fprintf (FvMapFile, "EntryPoint=0x%010llx", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));
+ fprintf (FvMapFile, "EntryPoint=0x%010llx, ", (unsigned long long) (ImageBaseAddress + AddressOfEntryPoint));
+ if (!pImageContext->IsTeImage) {
+ fprintf (FvMapFile, "Type=PE");
+ } else {
+ fprintf (FvMapFile, "Type=TE");
+ }
fprintf (FvMapFile, ")\n");
fprintf (FvMapFile, "(GUID=%s", FileGuidName);