summaryrefslogtreecommitdiff
path: root/BaseTools/Scripts/GccBase.lds
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-08-03 08:22:39 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-08-03 08:22:39 +0000
commit56948ba190b8920f38564050e1c2742b967a4d13 (patch)
tree1b9b38c035dca03e0ef23c27c29d14c344520e88 /BaseTools/Scripts/GccBase.lds
parentefe690cab3fb5c5d710dec49c472df09eaaaa5da (diff)
downloadedk2-platforms-56948ba190b8920f38564050e1c2742b967a4d13.tar.xz
BaseTools GCC: align start of .data to .text alignment
Now that GenFw honors the ELF section alignment when placing the PE/COFF sections in the output, the start of the PE/COFF version of .data will be aligned to the alignment of .text if its alignment is higher than the default. So duplicate this behavior in the ELF output, this will make the memory layout of the PE/COFF binary match the layout of the ELF version more closely. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Tested-by: Liming Gao <liming.gao@intel.com> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18136 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Scripts/GccBase.lds')
-rw-r--r--BaseTools/Scripts/GccBase.lds2
1 files changed, 1 insertions, 1 deletions
diff --git a/BaseTools/Scripts/GccBase.lds b/BaseTools/Scripts/GccBase.lds
index 0f0210e407..3d99f01db2 100644
--- a/BaseTools/Scripts/GccBase.lds
+++ b/BaseTools/Scripts/GccBase.lds
@@ -37,7 +37,7 @@ SECTIONS {
* between these sections is the same in the ELF and the PE/COFF versions of
* this binary.
*/
- .data : ALIGN(CONSTANT(COMMONPAGESIZE)) {
+ .data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
*(.data .data.* .gnu.linkonce.d.*)
*(.bss .bss.* *COM*)
}