Files
system76-edk2/ArmVirtPkg/PrePi/Scripts/PrePi-PIE.lds
Ard Biesheuvel b1e3967b16 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
2015-08-11 12:32:45 +00:00

43 lines
1006 B
Plaintext

#/** @file
#
# Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
# http://opensource.org/licenses/bsd-license.php
#
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#
#**/
SECTIONS
{
.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 = .);
}
/DISCARD/ : {
*(.note.GNU-stack)
*(.gnu_debuglink)
*(.interp)
*(.dynamic)
*(.dynsym)
*(.dynstr)
*(.hash)
*(.comment)
}
}