linux-hexagon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hexagon: vmlinux.lds.S: Handle attributes section
@ 2024-03-20  0:37 Nathan Chancellor
  2024-03-20  0:44 ` Brian Cain
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2024-03-20  0:37 UTC (permalink / raw)
  To: akpm, bcain
  Cc: ndesaulniers, morbo, justinstitt, linux-hexagon, llvm, patches,
	stable, Nathan Chancellor

After the linked LLVM change, the build fails with
CONFIG_LD_ORPHAN_WARN_LEVEL="error", which happens with allmodconfig:

  ld.lld: error: vmlinux.a(init/main.o):(.hexagon.attributes) is being placed in '.hexagon.attributes'

Handle the attributes section in a similar manner as arm and riscv by
adding it after the primary ELF_DETAILS grouping in vmlinux.lds.S, which
fixes the error.

Cc: stable@vger.kernel.org
Fixes: 113616ec5b64 ("hexagon: select ARCH_WANT_LD_ORPHAN_WARN")
Link: https://github.com/llvm/llvm-project/commit/31f4b329c8234fab9afa59494d7f8bdaeaefeaad
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/hexagon/kernel/vmlinux.lds.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/hexagon/kernel/vmlinux.lds.S b/arch/hexagon/kernel/vmlinux.lds.S
index 1140051a0c45..1150b77fa281 100644
--- a/arch/hexagon/kernel/vmlinux.lds.S
+++ b/arch/hexagon/kernel/vmlinux.lds.S
@@ -63,6 +63,7 @@ SECTIONS
 	STABS_DEBUG
 	DWARF_DEBUG
 	ELF_DETAILS
+	.hexagon.attributes 0 : { *(.hexagon.attributes) }
 
 	DISCARDS
 }

---
base-commit: e8f897f4afef0031fe618a8e94127a0934896aba
change-id: 20240319-hexagon-handle-attributes-section-vmlinux-lds-s-2a14b14799c0

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] hexagon: vmlinux.lds.S: Handle attributes section
  2024-03-20  0:37 [PATCH] hexagon: vmlinux.lds.S: Handle attributes section Nathan Chancellor
@ 2024-03-20  0:44 ` Brian Cain
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Cain @ 2024-03-20  0:44 UTC (permalink / raw)
  To: Nathan Chancellor, akpm
  Cc: ndesaulniers, morbo, justinstitt, linux-hexagon, llvm, patches, stable



> -----Original Message-----
> From: Nathan Chancellor <nathan@kernel.org>
> Sent: Tuesday, March 19, 2024 7:38 PM
> To: akpm@linux-foundation.org; Brian Cain <bcain@quicinc.com>
> Cc: ndesaulniers@google.com; morbo@google.com; justinstitt@google.com;
> linux-hexagon@vger.kernel.org; llvm@lists.linux.dev; patches@lists.linux.dev;
> stable@vger.kernel.org; Nathan Chancellor <nathan@kernel.org>
> Subject: [PATCH] hexagon: vmlinux.lds.S: Handle attributes section
> 
> WARNING: This email originated from outside of Qualcomm. Please be wary
> of any links or attachments, and do not enable macros.
> 
> After the linked LLVM change, the build fails with
> CONFIG_LD_ORPHAN_WARN_LEVEL="error", which happens with
> allmodconfig:
> 
>   ld.lld: error: vmlinux.a(init/main.o):(.hexagon.attributes) is being placed in
> '.hexagon.attributes'
> 
> Handle the attributes section in a similar manner as arm and riscv by
> adding it after the primary ELF_DETAILS grouping in vmlinux.lds.S, which
> fixes the error.
> 
> Cc: stable@vger.kernel.org
> Fixes: 113616ec5b64 ("hexagon: select ARCH_WANT_LD_ORPHAN_WARN")
> Link: https://github.com/llvm/llvm-
> project/commit/31f4b329c8234fab9afa59494d7f8bdaeaefeaad
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>
> ---
>  arch/hexagon/kernel/vmlinux.lds.S | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/hexagon/kernel/vmlinux.lds.S
> b/arch/hexagon/kernel/vmlinux.lds.S
> index 1140051a0c45..1150b77fa281 100644
> --- a/arch/hexagon/kernel/vmlinux.lds.S
> +++ b/arch/hexagon/kernel/vmlinux.lds.S
> @@ -63,6 +63,7 @@ SECTIONS
>         STABS_DEBUG
>         DWARF_DEBUG
>         ELF_DETAILS
> +       .hexagon.attributes 0 : { *(.hexagon.attributes) }
> 
>         DISCARDS
>  }
> 
> ---
> base-commit: e8f897f4afef0031fe618a8e94127a0934896aba
> change-id: 20240319-hexagon-handle-attributes-section-vmlinux-lds-s-
> 2a14b14799c0
> 
> Best regards,
> --
> Nathan Chancellor <nathan@kernel.org>

Reviewed-by: Brian Cain <bcain@quicinc.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-20  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-20  0:37 [PATCH] hexagon: vmlinux.lds.S: Handle attributes section Nathan Chancellor
2024-03-20  0:44 ` Brian Cain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).