Revision: 16838
http://sourceforge.net/p/edk2/code/16838
Author: vanjeff
Date: 2015-02-12 08:38:35 +0000 (Thu, 12 Feb 2015)
Log Message:
-----------
Update BaseTools from main trunk r16831.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/16831
Modified Paths:
--------------
branches/UDK2014.SP1/BaseTools/Bin/externals.txt
branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf32Convert.c
branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf64Convert.c
Property Changed:
----------------
branches/UDK2014.SP1/BaseTools/Bin/
Index: branches/UDK2014.SP1/BaseTools/Bin
===================================================================
--- branches/UDK2014.SP1/BaseTools/Bin 2015-02-12 07:46:25 UTC (rev 16837)
+++ branches/UDK2014.SP1/BaseTools/Bin 2015-02-12 08:38:35 UTC (rev 16838)
Property changes on: branches/UDK2014.SP1/BaseTools/Bin
___________________________________________________________________
Modified: svn:externals
## -1 +1 ##
-Win32 -r51 https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
+Win32 -r52 https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
Modified: branches/UDK2014.SP1/BaseTools/Bin/externals.txt
===================================================================
--- branches/UDK2014.SP1/BaseTools/Bin/externals.txt 2015-02-12 07:46:25 UTC
(rev 16837)
+++ branches/UDK2014.SP1/BaseTools/Bin/externals.txt 2015-02-12 08:38:35 UTC
(rev 16838)
@@ -1 +1 @@
-Win32 -r51 https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
+Win32 -r52 https://svn.code.sf.net/p/edk2-toolbinaries/code/trunk/Win32
Modified: branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf32Convert.c
===================================================================
--- branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf32Convert.c
2015-02-12 07:46:25 UTC (rev 16837)
+++ branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf32Convert.c
2015-02-12 08:38:35 UTC (rev 16838)
@@ -267,12 +267,10 @@
EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
UINT32 CoffEntry;
UINT32 SectionCount;
- BOOLEAN FoundText;
+ BOOLEAN FoundSection;
CoffEntry = 0;
mCoffOffset = 0;
- mTextOffset = 0;
- FoundText = FALSE;
//
// Coff file start with a DOS header.
@@ -297,6 +295,8 @@
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset);
+ mTextOffset = mCoffOffset;
+ FoundSection = FALSE;
SectionCount = 0;
for (i = 0; i < mEhdr->e_shnum; i++) {
Elf_Shdr *shdr = GetShdrByIndex(i);
@@ -324,9 +324,9 @@
//
// Set mTextOffset with the offset of the first '.text' section
//
- if (!FoundText) {
+ if (!FoundSection) {
mTextOffset = mCoffOffset;
- FoundText = TRUE;
+ FoundSection = TRUE;
}
mCoffSectionsOffset[i] = mCoffOffset;
@@ -335,7 +335,7 @@
}
}
- if (!FoundText) {
+ if (!FoundSection) {
Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' section.");
assert (FALSE);
}
@@ -352,6 +352,7 @@
// Then data sections.
//
mDataOffset = mCoffOffset;
+ FoundSection = FALSE;
SectionCount = 0;
for (i = 0; i < mEhdr->e_shnum; i++) {
Elf_Shdr *shdr = GetShdrByIndex(i);
@@ -369,6 +370,15 @@
Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
}
}
+
+ //
+ // Set mDataOffset with the offset of the first '.data' section
+ //
+ if (!FoundSection) {
+ mDataOffset = mCoffOffset;
+ FoundSection = TRUE;
+ }
+
mCoffSectionsOffset[i] = mCoffOffset;
mCoffOffset += shdr->sh_size;
SectionCount ++;
@@ -401,6 +411,7 @@
}
}
if (shdr->sh_size != 0) {
+ mHiiRsrcOffset = mCoffOffset;
mCoffSectionsOffset[i] = mCoffOffset;
mCoffOffset += shdr->sh_size;
mCoffOffset = CoffAlign(mCoffOffset);
Modified: branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf64Convert.c
===================================================================
--- branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf64Convert.c
2015-02-12 07:46:25 UTC (rev 16837)
+++ branches/UDK2014.SP1/BaseTools/Source/C/GenFw/Elf64Convert.c
2015-02-12 08:38:35 UTC (rev 16838)
@@ -260,12 +260,10 @@
EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
UINT32 CoffEntry;
UINT32 SectionCount;
- BOOLEAN FoundText;
+ BOOLEAN FoundSection;
CoffEntry = 0;
mCoffOffset = 0;
- mTextOffset = 0;
- FoundText = FALSE;
//
// Coff file start with a DOS header.
@@ -291,6 +289,8 @@
// First text sections.
//
mCoffOffset = CoffAlign(mCoffOffset);
+ mTextOffset = mCoffOffset;
+ FoundSection = FALSE;
SectionCount = 0;
for (i = 0; i < mEhdr->e_shnum; i++) {
Elf_Shdr *shdr = GetShdrByIndex(i);
@@ -318,9 +318,9 @@
//
// Set mTextOffset with the offset of the first '.text' section
//
- if (!FoundText) {
+ if (!FoundSection) {
mTextOffset = mCoffOffset;
- FoundText = TRUE;
+ FoundSection = TRUE;
}
mCoffSectionsOffset[i] = mCoffOffset;
@@ -329,7 +329,7 @@
}
}
- if (!FoundText) {
+ if (!FoundSection) {
Error (NULL, 0, 3000, "Invalid", "Did not find any '.text' section.");
assert (FALSE);
}
@@ -346,6 +346,7 @@
// Then data sections.
//
mDataOffset = mCoffOffset;
+ FoundSection = FALSE;
SectionCount = 0;
for (i = 0; i < mEhdr->e_shnum; i++) {
Elf_Shdr *shdr = GetShdrByIndex(i);
@@ -363,6 +364,14 @@
Error (NULL, 0, 3000, "Invalid", "Unsupported section alignment.");
}
}
+
+ //
+ // Set mDataOffset with the offset of the first '.data' section
+ //
+ if (!FoundSection) {
+ mDataOffset = mCoffOffset;
+ FoundSection = TRUE;
+ }
mCoffSectionsOffset[i] = mCoffOffset;
mCoffOffset += (UINT32) shdr->sh_size;
SectionCount ++;
@@ -395,6 +404,7 @@
}
}
if (shdr->sh_size != 0) {
+ mHiiRsrcOffset = mCoffOffset;
mCoffSectionsOffset[i] = mCoffOffset;
mCoffOffset += (UINT32) shdr->sh_size;
mCoffOffset = CoffAlign(mCoffOffset);
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits