You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
* Sync BaseTools to align with edk2-stable202311 Keep the SBL specific change (e.g. Lz4). Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Sync MdePkg from EDK2 edk2-stable202311 branch Only sync required file without any changes to EDK2 files. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Update MdePkg for SBL after sync from EDK2 Signed-off-by: Guo Dong <guo.dong@intel.com> * Update SBL after updating Basetool and MdePkg After Sync BaseTool and MdePkg to edk2-stable202311, Need update SBL code to align with this change. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: rollback some changes after mdepkg sync New change from MdePkg requires new NASM version. To make sure NASM 2.14.02 still works, just rollback few changes. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Update component size to fix build failure After syncing BaseTool and MdePkg, some components would have a little bigger size. So update the config to fix the build failure. Signed-off-by: Guo Dong <guo.dong@intel.com> * feat: Remove unused asl code Some ASL files don't exist but they are included in other asl files. It would cause build failure with new build BaseTool. So just remove them to fix the build failure. Signed-off-by: Guo Dong <guo.dong@intel.com> --------- Signed-off-by: Guo Dong <guo.dong@intel.com>
89 lines
2.4 KiB
Plaintext
89 lines
2.4 KiB
Plaintext
/** @file
|
|
|
|
Unified linker script for GCC based builds
|
|
|
|
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
|
|
Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
|
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
SECTIONS {
|
|
|
|
/*
|
|
* The PE/COFF binary consists of DOS and PE/COFF headers, and a sequence of
|
|
* section headers adding up to PECOFF_HEADER_SIZE bytes (which differs
|
|
* between 32-bit and 64-bit builds). The actual start of the .text section
|
|
* will be rounded up based on its actual alignment.
|
|
*/
|
|
. = PECOFF_HEADER_SIZE;
|
|
|
|
.text : ALIGN(CONSTANT(COMMONPAGESIZE)) {
|
|
*(.text .text.* .stub .gnu.linkonce.t.*)
|
|
*(.rodata .rodata.* .gnu.linkonce.r.*)
|
|
*(.got .got.*)
|
|
|
|
/*
|
|
* The contents of AutoGen.c files are mostly constant from the POV of the
|
|
* program, but most of it ends up in .data or .bss by default since few of
|
|
* the variable definitions that get emitted are declared as CONST.
|
|
* Unfortunately, we cannot pull it into the .text section entirely, since
|
|
* patchable PCDs are also emitted here, but we can at least move all of the
|
|
* emitted GUIDs here.
|
|
*/
|
|
*:AutoGen.obj(.data.g*Guid)
|
|
}
|
|
|
|
/*
|
|
* The alignment of the .data section should be less than or equal to the
|
|
* alignment of the .text section. This ensures that the relative offset
|
|
* between these sections is the same in the ELF and the PE/COFF versions of
|
|
* this binary.
|
|
*/
|
|
.data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
|
|
*(.data .data.* .gnu.linkonce.d.*)
|
|
*(.bss .bss.*)
|
|
}
|
|
|
|
.eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : {
|
|
KEEP (*(.eh_frame))
|
|
}
|
|
|
|
.rela (INFO) : {
|
|
*(.rela .rela.*)
|
|
}
|
|
|
|
.hii : ALIGN(CONSTANT(COMMONPAGESIZE)) {
|
|
KEEP (*(.hii))
|
|
}
|
|
|
|
.got : {
|
|
*(.got)
|
|
}
|
|
ASSERT(SIZEOF(.got) == 0, "Unexpected GOT entries detected!")
|
|
|
|
.got.plt (INFO) : {
|
|
*(.got.plt)
|
|
}
|
|
ASSERT(SIZEOF(.got.plt) == 0 || SIZEOF(.got.plt) == 0xc || SIZEOF(.got.plt) == 0x18, "Unexpected GOT/PLT entries detected!")
|
|
|
|
/*
|
|
* Retain the GNU build id but in a non-allocatable section so GenFw
|
|
* does not copy it into the PE/COFF image.
|
|
*/
|
|
.build-id (INFO) : { *(.note.gnu.build-id) }
|
|
|
|
/DISCARD/ : {
|
|
*(.note.GNU-stack)
|
|
*(.gnu_debuglink)
|
|
*(.interp)
|
|
*(.dynsym)
|
|
*(.dynstr)
|
|
*(.dynamic)
|
|
*(.hash .gnu.hash)
|
|
*(.comment)
|
|
}
|
|
}
|