diff options
| author | Peter Jones <pjones@redhat.com> | 2022-04-26 17:47:56 -0400 |
|---|---|---|
| committer | Peter Jones <pjones@redhat.com> | 2022-05-13 15:08:56 -0400 |
| commit | d6eb9c6cc7826cea02f31580ac0e56726ae80ad5 (patch) | |
| tree | 39d3806eed29fb7e09ac50e58e5820bee3f48de2 | |
| parent | 5c44aaf00bf0f5856f23b0027416cfaddb43462d (diff) | |
| download | efi-boot-shim-d6eb9c6cc7826cea02f31580ac0e56726ae80ad5.tar.gz efi-boot-shim-d6eb9c6cc7826cea02f31580ac0e56726ae80ad5.zip | |
Modernize aarch64
Now that we've got "objcopy --target efi-app-aarch64" and similar, we
don't have to go through heroic effort to try to make aarch64 builds
work.
This patch updates to a gnu-efi branch that has newer aarch64 crt0 code,
and makes efi_aarch64_efi.lds be nearly identical to efi_x86_64_efi.lds.
Signed-off-by: Peter Jones <pjones@redhat.com>
| -rw-r--r-- | .gitmodules | 2 | ||||
| -rw-r--r-- | Make.defaults | 4 | ||||
| -rw-r--r-- | elf_aarch64_efi.lds | 125 | ||||
| m--------- | gnu-efi | 0 |
4 files changed, 57 insertions, 74 deletions
diff --git a/.gitmodules b/.gitmodules index 1029752d..78424fbd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "gnu-efi"] path = gnu-efi url = https://github.com/rhboot/gnu-efi.git - branch = shim-15.5 + branch = shim-15.6 diff --git a/Make.defaults b/Make.defaults index 18677daa..dfed9c4a 100644 --- a/Make.defaults +++ b/Make.defaults @@ -84,9 +84,7 @@ ifeq ($(ARCH),aarch64) ARCH_GNUEFI ?= aarch64 ARCH_SUFFIX ?= aa64 ARCH_SUFFIX_UPPER ?= AA64 - FORMAT := -O binary - SUBSYSTEM := 0xa - ARCH_LDFLAGS += --defsym=EFI_SUBSYSTEM=$(SUBSYSTEM) + ARCH_LDFLAGS ?= ARCH_CFLAGS ?= endif ifeq ($(ARCH),arm) diff --git a/elf_aarch64_efi.lds b/elf_aarch64_efi.lds index 42825fd9..60c55ba5 100644 --- a/elf_aarch64_efi.lds +++ b/elf_aarch64_efi.lds @@ -3,109 +3,94 @@ OUTPUT_ARCH(aarch64) ENTRY(_start) SECTIONS { - .text 0x0 : { - _text = .; - *(.text.head) - *(.text) - *(.text.*) - *(.gnu.linkonce.t.*) - _evtext = .; - . = ALIGN(4096); + . = 0; + ImageBase = .; + .hash : { *(.hash) } /* this MUST come first! */ + . = ALIGN(4096); + .eh_frame : + { + *(.eh_frame) + } + . = ALIGN(4096); + .text : + { + _text = .; + *(.text) + *(.text.*) + *(.gnu.linkonce.t.*) + _etext = .; + } + . = ALIGN(4096); + .reloc : + { + *(.reloc) + } + . = ALIGN(4096); + .note.gnu.build-id : { + *(.note.gnu.build-id) + } + + . = ALIGN(4096); + .data.ident : { + *(.data.ident) } - _etext = .; - _text_size = . - _text; - _text_vsize = _evtext - _text; . = ALIGN(4096); .data : { _data = .; - *(.sdata) - *(.data) - *(.data1) - *(.data.*) + *(.rodata*) *(.got.plt) *(.got) - - *(.dynamic) - + *(.data*) + *(.sdata) /* 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) *(COMMON) - _evdata = .; - . = ALIGN(4096); - _bss_end = .; + *(.rel.local) } - _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); - .sbat : + .vendor_cert : { - _sbat = .; - *(.sbat) - *(.sbat.*) - _esbat = .; - . = ALIGN(4096); - _epsbat = .; + *(.vendor_cert) } - _sbat_size = _epsbat - _sbat; - _sbat_vsize = _esbat - _sbat; - . = ALIGN(4096); - .rodata : - { - _rodata = .; - *(.rodata*) - *(.srodata) - . = ALIGN(16); - *(.note.gnu.build-id) - . = ALIGN(4096); - *(.vendor_cert) - *(.data.ident) - . = ALIGN(4096); - } + .dynamic : { *(.dynamic) } . = ALIGN(4096); .rela : { - *(.rela.dyn) - *(.rela.plt) - *(.rela.got) - *(.rela.data) *(.rela.data*) + *(.rela.got*) + *(.rela.stab*) } + _edata = .; + _data_size = . - _data; . = ALIGN(4096); - .dyn : + .sbat : { - *(.dynsym) - *(.dynstr) - _evrodata = .; - . = ALIGN(4096); + _sbat = .; + *(.sbat) + *(.sbat.*) } - _erodata = .; - _rodata_size = . - _rodata; - _rodata_vsize = _evrodata - _rodata; - _alldata_size = . - _data; + _esbat = .; + _sbat_size = . - _sbat; - /DISCARD/ : + . = ALIGN(4096); + .dynsym : { *(.dynsym) } + . = ALIGN(4096); + .dynstr : { *(.dynstr) } + . = ALIGN(4096); + .ignored.reloc : { - *(.rel.reloc) + *(.rela.reloc) *(.eh_frame) *(.note.GNU-stack) } .comment 0 : { *(.comment) } + .note.gnu.build-id : { *(.note.gnu.build-id) } } diff --git a/gnu-efi b/gnu-efi -Subproject acc5371207f3041450e1d8ae5b24f6df3e82b15 +Subproject 03670e14f263ad571bf0f39dffa9b8d23535f4d |
