diff options
author | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-01-04 23:43:08 +0100 |
---|---|---|
committer | Heinrich Schuchardt <heinrich.schuchardt@canonical.com> | 2023-01-06 22:27:30 +0100 |
commit | 4bba71ff83e2b2a1607c5b3b9995767691242b29 (patch) | |
tree | b300b0210942482ba87e61b14e20ea8199fcaed6 /arch/arm | |
parent | 06d514d77c3700ec6166457f58d37652791038d0 (diff) |
efi_loader: make .data section of *_efi.so files RW
When building with binutils 2.39 warnings
*_efi.so has a LOAD segment with RWX permissions
occur.
Use SHF_WRITE | SHF_ALLOC as section flags for the .data section.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/lib/elf_aarch64_efi.lds | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/lib/elf_aarch64_efi.lds b/arch/arm/lib/elf_aarch64_efi.lds index ffc6f6e6045e..3e3da47d6a9d 100644 --- a/arch/arm/lib/elf_aarch64_efi.lds +++ b/arch/arm/lib/elf_aarch64_efi.lds @@ -7,6 +7,12 @@ OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64") OUTPUT_ARCH(aarch64) + +PHDRS +{ + data PT_LOAD FLAGS(3); /* SHF_WRITE | SHF_ALLOC */ +} + ENTRY(_start) SECTIONS { @@ -49,7 +55,7 @@ SECTIONS . = ALIGN(512); _bss_end = .; _edata = .; - } + } :data _data_size = _edata - _data; .rela.dyn : { *(.rela.dyn) } .rela.plt : { *(.rela.plt) } |