Skip to content

Commit

Permalink
hexagon: vmlinux.lds.S: handle attributes section
Browse files Browse the repository at this point in the history
commit 549aa96 upstream.

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.

Link: https://lkml.kernel.org/r/20240319-hexagon-handle-attributes-section-vmlinux-lds-s-v1-1-59855dab8872@kernel.org
Fixes: 113616e ("hexagon: select ARCH_WANT_LD_ORPHAN_WARN")
Link: llvm/llvm-project@31f4b32
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Brian Cain <bcain@quicinc.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
nathanchance authored and gregkh committed Apr 3, 2024
1 parent 679afb7 commit a079f72
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/hexagon/kernel/vmlinux.lds.S
Expand Up @@ -63,6 +63,7 @@ SECTIONS
STABS_DEBUG
DWARF_DEBUG
ELF_DETAILS
.hexagon.attributes 0 : { *(.hexagon.attributes) }

DISCARDS
}

0 comments on commit a079f72

Please sign in to comment.