2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-2-Clause */
|
2016-11-07 15:47:11 +00:00
|
|
|
/*
|
|
|
|
* U-Boot aarch64 EFI linker script
|
|
|
|
*
|
|
|
|
* Modified from elf_aarch64_efi.lds in gnu-efi
|
|
|
|
*/
|
|
|
|
|
|
|
|
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
|
|
|
|
OUTPUT_ARCH(aarch64)
|
2023-01-04 22:43:08 +00:00
|
|
|
|
|
|
|
PHDRS
|
|
|
|
{
|
|
|
|
data PT_LOAD FLAGS(3); /* SHF_WRITE | SHF_ALLOC */
|
|
|
|
}
|
|
|
|
|
2016-11-07 15:47:11 +00:00
|
|
|
ENTRY(_start)
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.text 0x0 : {
|
|
|
|
_text = .;
|
|
|
|
*(.text.head)
|
|
|
|
*(.text)
|
|
|
|
*(.text.*)
|
|
|
|
*(.gnu.linkonce.t.*)
|
|
|
|
*(.srodata)
|
|
|
|
*(.rodata*)
|
2022-12-31 10:58:54 +00:00
|
|
|
. = ALIGN(16);
|
|
|
|
*(.dynamic);
|
2022-01-14 20:40:15 +00:00
|
|
|
. = ALIGN(512);
|
2016-11-07 15:47:11 +00:00
|
|
|
}
|
2023-01-08 18:00:47 +00:00
|
|
|
.rela.dyn : { *(.rela.dyn) }
|
|
|
|
.rela.plt : { *(.rela.plt) }
|
|
|
|
.rela.got : { *(.rela.got) }
|
|
|
|
.rela.data : { *(.rela.data) *(.rela.data*) }
|
2016-11-07 15:47:11 +00:00
|
|
|
_etext = .;
|
|
|
|
_text_size = . - _text;
|
2022-12-31 10:58:54 +00:00
|
|
|
. = ALIGN(4096);
|
2016-11-07 15:47:11 +00:00
|
|
|
.data : {
|
|
|
|
_data = .;
|
|
|
|
*(.sdata)
|
|
|
|
*(.data)
|
|
|
|
*(.data1)
|
|
|
|
*(.data.*)
|
|
|
|
*(.got.plt)
|
|
|
|
*(.got)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* The EFI loader doesn't seem to like a .bss section, so we
|
|
|
|
* stick it all into .data:
|
|
|
|
*/
|
|
|
|
. = ALIGN(16);
|
|
|
|
_bss = .;
|
|
|
|
*(.sbss)
|
|
|
|
*(.scommon)
|
|
|
|
*(.dynbss)
|
|
|
|
*(.bss)
|
|
|
|
*(.bss.*)
|
|
|
|
*(COMMON)
|
2022-01-14 20:40:15 +00:00
|
|
|
. = ALIGN(512);
|
2016-11-07 15:47:11 +00:00
|
|
|
_bss_end = .;
|
|
|
|
_edata = .;
|
2023-01-04 22:43:08 +00:00
|
|
|
} :data
|
2022-12-31 10:58:54 +00:00
|
|
|
_data_size = _edata - _data;
|
2016-11-07 15:47:11 +00:00
|
|
|
|
|
|
|
. = ALIGN(4096);
|
|
|
|
.dynsym : { *(.dynsym) }
|
|
|
|
. = ALIGN(4096);
|
|
|
|
.dynstr : { *(.dynstr) }
|
|
|
|
. = ALIGN(4096);
|
|
|
|
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
|
|
|
/DISCARD/ : {
|
|
|
|
*(.rel.reloc)
|
|
|
|
*(.eh_frame)
|
|
|
|
*(.note.GNU-stack)
|
|
|
|
}
|
|
|
|
.comment 0 : { *(.comment) }
|
|
|
|
}
|