Revision: 18136
          http://sourceforge.net/p/edk2/code/18136
Author:   abiesheuvel
Date:     2015-08-03 08:22:39 +0000 (Mon, 03 Aug 2015)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Tested-by: Liming Gao <[email protected]>
Tested-by: Leif Lindholm <[email protected]>

Modified Paths:
--------------
    trunk/edk2/BaseTools/Scripts/GccBase.lds

Modified: trunk/edk2/BaseTools/Scripts/GccBase.lds
===================================================================
--- trunk/edk2/BaseTools/Scripts/GccBase.lds    2015-08-03 08:22:28 UTC (rev 
18135)
+++ trunk/edk2/BaseTools/Scripts/GccBase.lds    2015-08-03 08:22:39 UTC (rev 
18136)
@@ -37,7 +37,7 @@
    * 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*)
   }


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to