diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-08-11 12:32:45 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-08-11 12:32:45 +0000 |
commit | b1e3967b16087c4e376e44f346b07f6887daa07f (patch) | |
tree | ae9bdbf2ae1ae9a269d75dc1e309f80ebe23699a /ArmVirtPkg/PrePi | |
parent | 5bf512d380d0cd2ac5f3172bac29910011f6886d (diff) | |
download | edk2-b1e3967b16087c4e376e44f346b07f6887daa07f.tar.gz edk2-b1e3967b16087c4e376e44f346b07f6887daa07f.tar.bz2 edk2-b1e3967b16087c4e376e44f346b07f6887daa07f.zip |
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 <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18203 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmVirtPkg/PrePi')
-rw-r--r-- | ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds b/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds index 32af0696aa..3c89722dca 100644 --- a/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds +++ b/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds @@ -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)
|