From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 1/1] efi_loader: make .data section of *_efi.so files RW
Date: Thu, 5 Jan 2023 11:12:25 +0200 [thread overview]
Message-ID: <Y7aUeYWApyDOywcT@hades> (raw)
In-Reply-To: <20230104224308.37244-1-heinrich.schuchardt@canonical.com>
Hi Heinrich
On Wed, Jan 04, 2023 at 11:43:08PM +0100, Heinrich Schuchardt wrote:
> 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>
> ---
> arch/arm/lib/elf_aarch64_efi.lds | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/lib/elf_aarch64_efi.lds b/arch/arm/lib/elf_aarch64_efi.lds
> index ffc6f6e604..3e3da47d6a 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
Is this only to signal the end of the .data section? If so let's get rid
of it since no other section has that
> _data_size = _edata - _data;
> .rela.dyn : { *(.rela.dyn) }
> .rela.plt : { *(.rela.plt) }
> --
> 2.37.2
>
other than that
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
next prev parent reply other threads:[~2023-01-05 9:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-04 22:43 [PATCH 1/1] efi_loader: make .data section of *_efi.so files RW Heinrich Schuchardt
2023-01-05 9:12 ` Ilias Apalodimas [this message]
2023-01-05 9:59 ` Heinrich Schuchardt
2023-01-05 12:19 ` Heinrich Schuchardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y7aUeYWApyDOywcT@hades \
--to=ilias.apalodimas@linaro.org \
--cc=heinrich.schuchardt@canonical.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.