Sync BaseTools Branch (version r2149) to EDKII main trunk.
BaseTool Branch: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11640 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
This program and the accompanying materials are licensed and made available
|
||||
under the terms and conditions of the BSD License which accompanies this
|
||||
@@ -256,6 +256,7 @@ ScanSections64 (
|
||||
EFI_IMAGE_DOS_HEADER *DosHdr;
|
||||
EFI_IMAGE_OPTIONAL_HEADER_UNION *NtHdr;
|
||||
UINT32 CoffEntry;
|
||||
UINT32 SectionCount;
|
||||
|
||||
CoffEntry = 0;
|
||||
mCoffOffset = 0;
|
||||
@@ -284,6 +285,7 @@ ScanSections64 (
|
||||
//
|
||||
mCoffOffset = CoffAlign(mCoffOffset);
|
||||
mTextOffset = mCoffOffset;
|
||||
SectionCount = 0;
|
||||
for (i = 0; i < mEhdr->e_shnum; i++) {
|
||||
Elf_Shdr *shdr = GetShdrByIndex(i);
|
||||
if (IsTextShdr(shdr)) {
|
||||
@@ -308,6 +310,7 @@ ScanSections64 (
|
||||
}
|
||||
mCoffSectionsOffset[i] = mCoffOffset;
|
||||
mCoffOffset += (UINT32) shdr->sh_size;
|
||||
SectionCount ++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,10 +318,15 @@ ScanSections64 (
|
||||
mCoffOffset = CoffAlign(mCoffOffset);
|
||||
}
|
||||
|
||||
if (SectionCount > 1 && mOutImageType == FW_EFI_IMAGE) {
|
||||
Warning (NULL, 0, 0, NULL, "Mulitple sections in %s are merged into 1 text section. Source level debug might not work correctly.", mInImageName);
|
||||
}
|
||||
|
||||
//
|
||||
// Then data sections.
|
||||
//
|
||||
mDataOffset = mCoffOffset;
|
||||
SectionCount = 0;
|
||||
for (i = 0; i < mEhdr->e_shnum; i++) {
|
||||
Elf_Shdr *shdr = GetShdrByIndex(i);
|
||||
if (IsDataShdr(shdr)) {
|
||||
@@ -337,10 +345,15 @@ ScanSections64 (
|
||||
}
|
||||
mCoffSectionsOffset[i] = mCoffOffset;
|
||||
mCoffOffset += (UINT32) shdr->sh_size;
|
||||
SectionCount ++;
|
||||
}
|
||||
}
|
||||
mCoffOffset = CoffAlign(mCoffOffset);
|
||||
|
||||
if (SectionCount > 1 && mOutImageType == FW_EFI_IMAGE) {
|
||||
Warning (NULL, 0, 0, NULL, "Mulitple sections in %s are merged into 1 data section. Source level debug might not work correctly.", mInImageName);
|
||||
}
|
||||
|
||||
//
|
||||
// The HII resource sections.
|
||||
//
|
||||
|
Reference in New Issue
Block a user