audk/BaseTools
Ard Biesheuvel b12ef6b964 BaseTools RVCT: use scatter file to enforce minimum section alignment
Up until SVN r18540, GenFw created invalid PE/COFF binaries for the ARM
architecture, by allowing PE/COFF .data sections to appear at offsets
that were not aligned to the global PE/COFF section alignment. The
reason for this was that the relocation metadata emitted by RVCT's
armlink only contains dynamic absolute relocations, so it is impossible
to recalculate relative relocations between .text and .data, and so the
relative offset between the two needs to be preserved.

Since r18540, we do align .data to the PE/COFF section alignment,
resulting in potentially corrupt PE/COFF binaries unless .data happens
to appear at a 32-byte aligned offset. So let's introduce a RVCT scatter
file that sets this alignment for the ELF .data section (and subsequent
.bss section).

At the same time, set the start offset to 0x220 bytes (which is the size
of our 32-bit PE/COFF header) so that the memory layouts are identical
between ELF and PE/COFF. Also add a 4 KB aligned version that can be
used to build DXE_RUNTIME_DRIVER modules with runtime memory protection
enabled.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19235 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-14 07:55:46 +00:00
..
Bin Revert the change in r18404. 2015-09-06 08:58:25 +00:00
BinWrappers/PosixLike BaseTools: Fix BinWrappers LzmaF86Compress Script 2015-07-10 02:51:38 +00:00
Conf BaseTools RVCT: use scatter file to enforce minimum section alignment 2015-12-14 07:55:46 +00:00
Scripts BaseTools RVCT: use scatter file to enforce minimum section alignment 2015-12-14 07:55:46 +00:00
Source Revert the change in r19143 for BUILDRULEORDER. 2015-12-08 03:06:41 +00:00
Tests BaseTools/Tests: Verify supported UTF-8 data is allowed 2015-06-23 23:34:43 +00:00
UserManuals BaseTools: update man page to add some descriptions 2015-12-07 09:10:33 +00:00
gcc Sync BaseTools Branch (version r2321) to EDKII main trunk. 2011-09-18 12:17:25 +00:00
.gitignore BaseTools: Ignore BaseTools/Bin/Win32 directory in .gitignore 2015-04-17 07:40:44 +00:00
BuildEnv BaseTools: Update edksetup.sh to support multiple workspaces 2015-10-08 09:29:56 +00:00
BuildNotes.txt Sync BaseTools Branch (version r2271) to EDKII main trunk. 2011-08-26 07:46:26 +00:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
GNUmakefile Sync BaseTool trunk (version r2599) into EDKII BaseTools. 2013-08-23 02:18:16 +00:00
License.txt Sync BaseTool trunk (version r2599) into EDKII BaseTools. 2013-08-23 02:18:16 +00:00
Makefile Sync EDKII BaseTools to BaseTools project r1971 2010-05-18 05:04:32 +00:00
ReadMe.txt Sync BaseTool trunk (version r2599) into EDKII BaseTools. 2013-08-23 02:18:16 +00:00
building-gcc.txt Sync BaseTool trunk (version r2649) into EDKII BaseTools. 2014-01-27 05:23:15 +00:00
get_vsvars.bat Sync BaseTool trunk (version r2670) into EDKII BaseTools. 2014-07-01 07:10:10 +00:00
toolsetup.bat BaseTools/toolsetup.bat: fixed the error when the path contains space 2015-11-30 03:43:25 +00:00

ReadMe.txt

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This directory contains the next generation of EDK II build tools and template files.
Templates are located in the Conf directory, while the tools executables for
Microsoft Windows 32-bit Operating Systems are located in the Bin\Win32 directory, other 
directory contatins tools source.

1. Build step to generate the binary tools.

=== Windows/Visual Studio Notes ===

To build the BaseTools, you should run the standard vsvars32.bat script.

In addition to this, you should set the following environment variables:

 * EDK_TOOLS_PATH - Path to the BaseTools sub directory under the edk2 tree
 * BASE_TOOLS_PATH - The directory where the BaseTools source is located.
   (It is the same directory where this README.txt is located.)
 * PYTHON_FREEZER_PATH - Path to where the python freezer tool is installed

After this, you can run the toolsetup.bat file, which is in the same
directory as this file.  It should setup the remainder of the environment,
and build the tools if necessary.

Please also refer to the 'BuildNotes.txt' file for more information on
building under Windows.

=== Unix-like operating systems ===

To build on Unix-like operating systems, you only need to type 'make' in
the base directory of the project.

=== Ubuntu Notes ===

On Ubuntu, the following command should install all the necessary build
packages to build all the C BaseTools:

  sudo apt-get install build-essential uuid-dev

=== Python sqlite3 module ===
On Windows, the cx_freeze will not copy the sqlite3.dll to the frozen 
binary directory (the same directory as build.exe and GenFds.exe). 
Please copy it manually from <PythonHome>\DLLs.

The Python distributed with most recent Linux will have sqlite3 module
built in. If not, please install sqlit3 package separately.

26-OCT-2011