public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Feng, YunhuaX" <yunhuax.feng@intel.com>
To: "devel@edk2.groups.io" <devel@edk2.groups.io>
Cc: "Feng, Bob C" <bob.c.feng@intel.com>,
	"Gao, Liming" <liming.gao@intel.com>
Subject: [PATCH] BaseTools: Fix binary file not generate map file issue
Date: Sat, 9 May 2020 09:34:04 +0000	[thread overview]
Message-ID: <BN8PR11MB379372801AC55C44FFFE05A38DA30@BN8PR11MB3793.namprd11.prod.outlook.com> (raw)

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2624

When EFI file come from binary file, not generate .map file, so need ignore the map file.

Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
---
 BaseTools/Source/Python/GenFds/EfiSection.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py b/BaseTools/Source/Python/GenFds/EfiSection.py
index db892df345..e7d4639041 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -266,11 +266,11 @@ class EfiSection (EfiSectionClassObject):
                         elif ImageObj.SectionAlignment < 0x100000:
                             Align = str (ImageObj.SectionAlignment // 0x400) + 'K'
                         else:
                             Align = str (ImageObj.SectionAlignment // 0x100000) + 'M'

-                    if File[(len(File)-4):] == '.efi':
+                    if File[(len(File)-4):] == '.efi' and FfsInf.InfModule.BaseName == os.path.basename(File)[:-4]:
                         MapFile = File.replace('.efi', '.map')
                         CopyMapFile = os.path.join(OutputPath, ModuleName + '.map')
                         if IsMakefile:
                             if GenFdsGlobalVariable.CopyList == []:
                                 GenFdsGlobalVariable.CopyList = [(MapFile, CopyMapFile)]
--
2.12.2.windows.2


             reply	other threads:[~2020-05-09  9:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-09  9:34 Feng, YunhuaX [this message]
2020-05-13  2:14 ` [PATCH] BaseTools: Fix binary file not generate map file issue Bob Feng

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=BN8PR11MB379372801AC55C44FFFE05A38DA30@BN8PR11MB3793.namprd11.prod.outlook.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