public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Jones <andrew.jones@linux.dev>
To: Thomas Huth <thuth@redhat.com>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH] arm/flat.lds: Specify program headers with flags to avoid linker warnings
Date: Fri, 23 Jun 2023 17:38:18 +0200	[thread overview]
Message-ID: <20230623-1c78966b728c5abb3922bbdf@orel> (raw)
In-Reply-To: <20230623130528.483909-1-thuth@redhat.com>

On Fri, Jun 23, 2023 at 03:05:28PM +0200, Thomas Huth wrote:
> With ld from binutils v2.40 I currently get warning messages like this:
> 
>  ld: warning: arm/spinlock-test.elf has a LOAD segment with RWX permissions
>  ld: warning: arm/selftest.elf has a LOAD segment with RWX permissions
>  ld: warning: arm/pci-test.elf has a LOAD segment with RWX permissions
>  ld: warning: arm/pmu.elf has a LOAD segment with RWX permissions
>  ...
> 
> Seems like these can be silenced by explicitly specifying the program
> headers with the appropriate flags (like we did in commit 0a06949aafac4a4
> on x86 and in commit 5126732d73aa75 on powerpc already).
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  arm/flat.lds | 12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/arm/flat.lds b/arm/flat.lds
> index 47fcb649..f722c650 100644
> --- a/arm/flat.lds
> +++ b/arm/flat.lds
> @@ -22,10 +22,16 @@
>   *    +----------------------+   <-- physical address 0x0
>   */
>  
> +PHDRS
> +{
> +    text PT_LOAD FLAGS(5);
> +    data PT_LOAD FLAGS(6);
> +}
> +
>  SECTIONS
>  {
>      PROVIDE(_text = .);
> -    .text : { *(.init) *(.text) *(.text.*) }
> +    .text : { *(.init) *(.text) *(.text.*) } :text
>      . = ALIGN(64K);
>      PROVIDE(etext = .);
>  
> @@ -39,8 +45,8 @@ SECTIONS
>      .got      : { *(.got) *(.got.plt) }
>      .eh_frame : { *(.eh_frame) }
>  
> -    .rodata   : { *(.rodata*) }
> -    .data     : { *(.data) }
> +    .rodata   : { *(.rodata*) } :data
> +    .data     : { *(.data) } :data
>      . = ALIGN(16);
>      PROVIDE(bss = .);
>      .bss      : { *(.bss) }
> -- 
> 2.39.3
>

Applied to arm/queue

https://gitlab.com/jones-drew/kvm-unit-tests/-/commits/arm/queue

Thanks,
drew

      reply	other threads:[~2023-06-23 15:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-23 13:05 [kvm-unit-tests PATCH] arm/flat.lds: Specify program headers with flags to avoid linker warnings Thomas Huth
2023-06-23 15:38 ` Andrew Jones [this message]

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=20230623-1c78966b728c5abb3922bbdf@orel \
    --to=andrew.jones@linux.dev \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=thuth@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox