Revision: 18203
          http://sourceforge.net/p/edk2/code/18203
Author:   abiesheuvel
Date:     2015-08-11 12:32:45 +0000 (Tue, 11 Aug 2015)
Log Message:
-----------
ArmVirtPkg: use global section alignment in custom linker script

The ArmVirtPrePiUniCoreRelocatable module comes with its own GNU
linker script to create a PIE executable that can relocate itself
at runtime. In order to be able to build this module using CLANG,
we need to adhere to the section alignment passed via to the linker
using -z commmon-page-size, so add this to the linker script.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <[email protected]>
Acked-by: Laszlo Ersek <[email protected]>

Modified Paths:
--------------
    trunk/edk2/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds

Modified: trunk/edk2/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds
===================================================================
--- trunk/edk2/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds   2015-08-11 12:32:38 UTC 
(rev 18202)
+++ trunk/edk2/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds   2015-08-11 12:32:45 UTC 
(rev 18203)
@@ -14,20 +14,20 @@
 
 SECTIONS
 {
-  .text 0x0 : {
+  .text 0x0 : ALIGN(CONSTANT(COMMONPAGESIZE)) {
     PROVIDE(__reloc_base = .);
 
     *(.text .text*)
     *(.got .got*)
     *(.rodata .rodata*)
     *(.data .data*)
+    *(.bss .bss*)
 
     . = ALIGN(0x20);
     PROVIDE(__reloc_start = .);
     *(.rela .rela*)
     PROVIDE(__reloc_end = .);
   }
-  .bss ALIGN(0x20) : { *(.bss .bss*) }
 
   /DISCARD/ : {
     *(.note.GNU-stack)


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

Reply via email to