efi_loader: add .rela sections to .text on arm64

_relocate() needs the information in .rela* for self relocation
of the EFI binary.

Fixes: d7ddeb66a6 ("efi_loader: fix building aarch64 EFI binaries")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Heinrich Schuchardt 2023-01-08 19:00:47 +01:00
parent 0763c02eee
commit 7e808fcc97

View File

@ -28,6 +28,10 @@ SECTIONS
*(.dynamic);
. = ALIGN(512);
}
.rela.dyn : { *(.rela.dyn) }
.rela.plt : { *(.rela.plt) }
.rela.got : { *(.rela.got) }
.rela.data : { *(.rela.data) *(.rela.data*) }
_etext = .;
_text_size = . - _text;
. = ALIGN(4096);
@ -57,10 +61,6 @@ SECTIONS
_edata = .;
} :data
_data_size = _edata - _data;
.rela.dyn : { *(.rela.dyn) }
.rela.plt : { *(.rela.plt) }
.rela.got : { *(.rela.got) }
.rela.data : { *(.rela.data) *(.rela.data*) }
. = ALIGN(4096);
.dynsym : { *(.dynsym) }