diff options
author | Steve McIntyre <steve@einval.com> | 2021-03-31 18:24:24 +0100 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2021-03-31 18:24:24 +0100 |
commit | 8119f7183f5f0bebb168fec5239855552020cf66 (patch) | |
tree | 19f2bf9871d671b570a5ccaabc89ffd743b4cd10 /elf_aarch64_efi.lds | |
parent | 031e5cce385d3f96b1caa1d53495332a7eb03749 (diff) | |
download | efi-boot-shim-upstream/15.4.tar.gz efi-boot-shim-upstream/15.4.zip |
New upstream version 15.4upstream/15.4
Diffstat (limited to 'elf_aarch64_efi.lds')
-rw-r--r-- | elf_aarch64_efi.lds | 85 |
1 files changed, 46 insertions, 39 deletions
diff --git a/elf_aarch64_efi.lds b/elf_aarch64_efi.lds index feb4ead9..353b24a0 100644 --- a/elf_aarch64_efi.lds +++ b/elf_aarch64_efi.lds @@ -9,24 +9,12 @@ SECTIONS *(.text) *(.text.*) *(.gnu.linkonce.t.*) - *(.srodata) - *(.rodata*) - . = ALIGN(16); - _etext = .; - } - - . = ALIGN(4096); - .dynamic : { *(.dynamic) } - - . = ALIGN(4096); - .note.gnu.build-id : { - *(.note.gnu.build-id) - } - - . = ALIGN(4096); - .data.ident : { - *(.data.ident) + _evtext = .; + . = ALIGN(4096); } + _etext = .; + _text_size = . - _text; + _text_vsize = _evtext - _text; . = ALIGN(4096); .data : @@ -39,6 +27,8 @@ SECTIONS *(.got.plt) *(.got) + *(.dynamic) + /* the EFI loader doesn't seem to like a .bss section, so we stick it all into .data: */ . = ALIGN(16); @@ -48,44 +38,61 @@ SECTIONS *(.dynbss) *(.bss) *(COMMON) - . = ALIGN(16); + _evdata = .; + . = ALIGN(4096); _bss_end = .; } + _edata = .; + _data_vsize = _evdata - _data; + _data_size = . - _data; + /* + * Note that _sbat must be the beginning of the data, and _esbat must be the + * end and must be before any section padding. The sbat self-check uses + * _esbat to find the bounds of the data, and if the padding is included, the + * CSV parser (correctly) rejects the data as having NUL values in one of the + * required columns. + */ . = ALIGN(4096); - .vendor_cert : + .sbat : { - *(.vendor_cert) + _sbat = .; + *(.sbat) + *(.sbat.*) + _esbat = .; + . = ALIGN(4096); + _epsbat = .; } + _sbat_size = _epsbat - _sbat; + _sbat_vsize = _esbat - _sbat; + . = ALIGN(4096); - .rela : + .rodata : { + _rodata = .; *(.rela.dyn) *(.rela.plt) *(.rela.got) *(.rela.data) *(.rela.data*) + + *(.rodata*) + *(.srodata) + *(.dynsym) + *(.dynstr) + . = ALIGN(16); + *(.note.gnu.build-id) + . = ALIGN(4096); + *(.vendor_cert) + *(.data.ident) + _evrodata = .; + . = ALIGN(4096); } - _edata = .; - _data_size = . - _data; - . = ALIGN(4096); - .sbat : - { - _sbat = .; - *(.sbat) - *(.sbat.*) - } - _esbat = .; - _sbat_vsize = . - _sbat; - . = ALIGN(4096); - _sbat_size = . - _sbat; + _erodata = .; + _rodata_size = . - _rodata; + _rodata_vsize = _evrodata - _rodata; _alldata_size = . - _data; - . = ALIGN(4096); - .dynsym : { *(.dynsym) } - . = ALIGN(4096); - .dynstr : { *(.dynstr) } - . = ALIGN(4096); /DISCARD/ : { *(.rel.reloc) |