Commit b89919ee8f8c ("BaseTools AARCH64: override XIP module linker alignment to 32 bytes") updated the various AARCH64 toolchain definitions to allow SEC, PEI_CORE and PEIM modules to be built with minimal alignment requirements even when using the AArch64 small code model which normally requires 4 KB section alignment. This involves conversion of ADRP instructions into ADR instructions, which can only be done reliably if the ELF and the PE/COFF sections appear at the same offset modulo 4 KB. The ArmVirtPrePiUniCoreRelocatable linker script did not yet take this into account, so update it by starting the .text section at the next appropriately aligned offset PECOFF_HEADER_SIZE bytes into the image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Acked-by: Laszlo Ersek <lersek@redhat.com>
48 lines
1.1 KiB
Plaintext
48 lines
1.1 KiB
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
|
|
{
|
|
PROVIDE(__reloc_base = .);
|
|
|
|
. = PECOFF_HEADER_SIZE;
|
|
.text : ALIGN(CONSTANT(COMMONPAGESIZE)) {
|
|
*(.text .text*)
|
|
*(.got .got*)
|
|
*(.rodata .rodata*)
|
|
*(.data .data*)
|
|
*(.bss .bss*)
|
|
|
|
. = ALIGN(0x20);
|
|
PROVIDE(__reloc_start = .);
|
|
*(.rel .rel.*)
|
|
*(.rela .rela.*)
|
|
PROVIDE(__reloc_end = .);
|
|
}
|
|
|
|
.note (INFO) : { *(.note.gnu.build-id) }
|
|
|
|
/DISCARD/ : {
|
|
*(.note.GNU-stack)
|
|
*(.gnu.hash)
|
|
*(.gnu_debuglink)
|
|
*(.interp)
|
|
*(.dynamic)
|
|
*(.dynsym)
|
|
*(.dynstr)
|
|
*(.hash)
|
|
*(.comment)
|
|
}
|
|
}
|