Re: [edk2] [edk2-buildtools] [PATCH] Fixed calculation of BaseOfCode in GenFw when the first code section is aligned

Subject: Re: [edk2] [edk2-buildtools] [PATCH] Fixed calculation of BaseOfCode in GenFw when the first code section is aligned

From: Andrew Fish <afish@apple.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2013-09-01 15:29:03

Sergey,

If the Python function has arg = value, then value is used if arg is not passed.

Sent from my iPhone

On Aug 31, 2013, at 11:27 PM, Sergey Isakov <isakov-sl@bk.ru> wrote:

SIrs,
I want to bump the question.
edk2/BaseTools/Source/Python/UPT/Library/Misc.py 
and
edk2/BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py
have different number of arguments for the procedure
GetLibInstanceInfo(x, x, x, x)

Or it is my Python misunderstanding?
Sergey

On 23.08.2013, at 15:02, Sergey Isakov <isakov-sl@bk.ru> wrote:

What I notice
-----
trunk/edk2/BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py
+++ b/trunk/edk2/BaseTools/Source/Python/UPT/Parser/InfLibrarySectionParser.py
@@ -170,28 +170,29 @@
                             File=FileName, 
                             Line=LineNo, 
                             ExtraData=LineContent)
-            
+
             if IsLibInstanceInfo(LineContent):
                 LibInsFlag = True
                 continue
-            
+
             if LibInsFlag:
-                LibGuid, LibVer = GetLibInstanceInfo(LineContent, GlobalData.gWORKSPACE, LineNo)
+                LibGuid, LibVer = GetLibInstanceInfo(LineContent, GlobalData.gWORKSPACE, LineNo, FileName)
      
--------------------------
GetLibInstanceInfo have 4 arguments now. But its definition in file misc.py is not updated
--------
## GetLibInstanceInfo
#
# Get the information from Library Instance INF file.
#
# @param string.  A string start with # and followed by INF file path
# @param WorkSpace. The WorkSpace directory used to combined with INF file path.
#
# @return GUID, Version
def GetLibInstanceInfo(String, WorkSpace, LineNo):

--------

23.08.2013, 13:54, Olivier Martin ():

The BaseTools has been synced up in EDKII r14591. EDK2 were using BaseTools
from June 2012.

The changes I can see in GenFw since the last sync are:

----------
commit 37b1901ef42e0442dc80237b5cae46d8dcc99b54
Author: oliviermartin <oliviermartin@c2973edb-eda0-4c78-bc6a-9341b269661f>
Date:   Wed Jul 31 10:43:59 2013 +0000

   BaseTools: Added support for Aarch64 ARM architecture

   Contributed-under: TianoCore Contribution Agreement 1.0
   Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
   Signed-off-by: Olivier Martin <olivier.martin@arm.com>
   Reviewed-by: Yingke Liu <yingke.d.liu@intel.com>

   git-svn-id: https://svn.code.sf.net/p/edk2-buildtools/code/trunk@2590
c2973edb-eda0-4c78-bc6a-9341b269661f

commit 43849c6fe6ec48f3ef30c940e3d9517124088042
Author: lgao4 <lgao4@c2973edb-eda0-4c78-bc6a-9341b269661f>
Date:   Fri Jul 19 06:39:08 2013 +0000

   Removing Windows from comment and adding GNU/Linux
   in GNUMakefile which is only used for Linux.

   Contributed-under: TianoCore Contribution Agreement 1.0
   Signed-off-by: Parmeshwr Prasad <parmeshwr_prasad@dell.com>
   Reviewed-by: Liming Gao <liming.gao@intel.com>

   git-svn-id: https://svn.code.sf.net/p/edk2-buildtools/code/trunk@2589
c2973edb-eda0-4c78-bc6a-9341b269661f
----------



-----Original Message-----
From: Sergey Isakov [mailto:isakov-sl@bk.ru]
Sent: 23 August 2013 10:47
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] [edk2-buildtools] [PATCH] Fixed calculation of
BaseOfCode in GenFw when the first code section is aligned

I don't know what is happen but since today I can't compile anything
------------
GenFw: ERROR 3000: Invalid

/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/OvmfPkg/Sec/SecM
ain/DEBUG/SecMain.dll bad symbol definition.
GenFw: ERROR 3000: Invalid

/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/OvmfPkg/Sec/SecM
ain/DEBUG/SecMain.dll bad symbol definition.
GenFw: ERROR 3000: Invalid

/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/OvmfPkg/Sec/SecM
ain/DEBUG/SecMain.dll bad symbol definition.
GenFw: ERROR 3000: Invalid

/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/OvmfPkg/Sec/SecM
ain/DEBUG/SecMain.dll bad symbol definition.
GenFw: ERROR 3000: Invalid

/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/OvmfPkg/Sec/SecM
ain/DEBUG/SecMain.dll bad symbol definition.
GenFw: ERROR 3000: Invalid

/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/OvmfPkg/Sec/SecM
ain/DEBUG/SecMain.dll bad symbol definition.


build.py...
: error 7000: Failed to execute command
make tbuild
[/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/OvmfPkg/Sec/Sec
Main]


build.py...
: error 7000: Failed to execute command
make tbuild
[/Users/Sergey/src/edk2/Build/OvmfX64/RELEASE_GCC47/X64/MdeModulePkg/Co
re/Pei/PeiMain]


build.py...
: error F002: Failed to build module
/Users/Sergey/src/edk2/OvmfPkg/Sec/SecMain.inf [X64, GCC47,
RELEASE]

- Failed -
Build end time: 13:43:48, Aug.23 2013
Build total time: 00:00:43

-------------

23.08.2013, 12:43, Olivier Martin ():

Any feedback on this one?

-----Original Message-----
From: Olivier Martin
Sent: 16 July 2013 05:51
To: Jordan Justen
Cc: edk2-buildtools-devel@lists.sourceforge.net; edk2-
devel@lists.sourceforge.net
Subject: RE: [edk2-buildtools] [PATCH] Fixed calculation of
BaseOfCode
in GenFw when the first code section is aligned

Here is the new version that takes in account your comments.

I took note of 'git send-email'; I will have a look to use it in a
near
future.
________________________________________
From: Jordan Justen [jljusten@gmail.com]
Sent: 17 June 2013 22:37
To: Olivier Martin
Cc: edk2-buildtools-devel@lists.sourceforge.net; edk2-
devel@lists.sourceforge.net
Subject: Re: [edk2-buildtools] [PATCH] Fixed calculation of
BaseOfCode
in GenFw when the first code section is aligned

Since you use git, maybe you could use git send-email, since it
makes
it easier to code-review, and then reply and reference particular
code
in the patch?

Sent twice, but they look the same. Is that right?

Maybe an ASSERT (FoundText) at the end of the routine?

For comments, we usually like to waste 2 extra lines with empty //
comments. :)

FoundText == FALSE => !FoundText

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

On Tue, Jun 11, 2013 at 3:04 AM, Olivier Martin
<olivier.martin@arm.com> wrote:
Dear EDK2 BaseTools maintainers,

Please find this patch that fixes the calculation of the PE/COFF
header
attribute 'BaseOfCode' when the first '.text' section is aligned.

In the current code base, the alignment of the first code section
is
not
taken into account for the calculation of BaseOfCode.

Regards,

Olivier


-------------------------------------------------------------------
--
---------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
edk2-buildtools-devel mailing list
edk2-buildtools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel






---------------------------------------------------------------------
---------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance
Management.
Visit us today!

http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.cl
ktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel



-----------------------------------------------------------------------
-------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance
Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.cl
ktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel




------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and
AppDynamics. Performance Central is your source for news, insights,
analysis and resources for efficient Application Performance Management.
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel