Previously the linker would produce this line as the first
line in the map file:
  "Archive member included because of file (symbol)"

With a newer linker, this is seen:
  "Archive member included to satisfy reference by file (symbol)"

This change appears to have happened in binutils commit
16e4ecc0dbe114cfc97fe2cd32a035ae4c37f22b
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=16e4ecc0

To account for both situation, look for a line that starts
with "Archive member included " and ends with " file (symbol)"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <[email protected]>
Cc: Liming Gao <[email protected]>
---
 Source/Python/GenPatchPcdTable/GenPatchPcdTable.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py 
b/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
index b6227d2..9cfdad3 100644
--- a/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
+++ b/Source/Python/GenPatchPcdTable/GenPatchPcdTable.py
@@ -53,7 +53,9 @@ def parsePcdInfoFromMapFile(mapfilepath, efifilepath):
         return None
     
     if len(lines) == 0: return None
-    if lines[0].strip().find("Archive member included because of file 
(symbol)") != -1:
+    firstline = lines[0].strip()
+    if (firstline.startswith("Archive member included ") and
+        firstline.endswith(" file (symbol)")):
         return _parseForGCC(lines, efifilepath)
     return _parseGeneral(lines, efifilepath)
 
-- 
1.9.rc1


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
edk2-buildtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel

Reply via email to