Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add ARM AArch64 support #468

Merged
merged 1 commit into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -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
4 changes: 1 addition & 3 deletions Make.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
125 changes: 55 additions & 70 deletions elf_aarch64_efi.lds
Original file line number Diff line number Diff line change
Expand Up @@ -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) }
}
2 changes: 1 addition & 1 deletion gnu-efi