All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: Make UNWINDER_ARM depend on ld.bfd or ld.lld 11.0.0+
@ 2021-03-11  0:54 ` Nathan Chancellor
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2021-03-11  0:54 UTC (permalink / raw)
  To: Russell King, Nick Desaulniers, Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, clang-built-linux, Nathan Chancellor

When linking aspeed_g5_defconfig with ld.lld 10.0.1, the following error
occurs:

ld.lld: error: .tmp_vmlinux.kallsyms1:(.ARM.exidx+0x34D98): relocation
R_ARM_PREL31 out of range: 2135538592 is not in [-1073741824,
1073741823]

This was resolved in ld.lld 11.0.0 but the minimum supported version of
ld.lld for the kernel is 10.0.1. Prevent CONFIG_UNWINDER_ARM from being
selected in this case so that the problematic sections cannot be
created.

Link: https://github.com/ClangBuiltLinux/linux/issues/732
Link: https://github.com/llvm/llvm-project/commit/48aebfc908ba7b9372aaa478a9c200789491096e
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/arm/Kconfig.debug | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9e0b5e7f12af..64c1f8a46ab5 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -66,6 +66,8 @@ config UNWINDER_FRAME_POINTER
 config UNWINDER_ARM
 	bool "ARM EABI stack unwinder"
 	depends on AEABI && !FUNCTION_GRAPH_TRACER
+	# https://github.com/ClangBuiltLinux/linux/issues/732
+	depends on !LD_IS_LLD || LLD_VERSION >= 110000
 	select ARM_UNWIND
 	help
 	  This option enables stack unwinding support in the kernel

base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
-- 
2.31.0.rc1


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

* [PATCH] ARM: Make UNWINDER_ARM depend on ld.bfd or ld.lld 11.0.0+
@ 2021-03-11  0:54 ` Nathan Chancellor
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Chancellor @ 2021-03-11  0:54 UTC (permalink / raw)
  To: Russell King, Nick Desaulniers, Arnd Bergmann
  Cc: linux-arm-kernel, linux-kernel, clang-built-linux, Nathan Chancellor

When linking aspeed_g5_defconfig with ld.lld 10.0.1, the following error
occurs:

ld.lld: error: .tmp_vmlinux.kallsyms1:(.ARM.exidx+0x34D98): relocation
R_ARM_PREL31 out of range: 2135538592 is not in [-1073741824,
1073741823]

This was resolved in ld.lld 11.0.0 but the minimum supported version of
ld.lld for the kernel is 10.0.1. Prevent CONFIG_UNWINDER_ARM from being
selected in this case so that the problematic sections cannot be
created.

Link: https://github.com/ClangBuiltLinux/linux/issues/732
Link: https://github.com/llvm/llvm-project/commit/48aebfc908ba7b9372aaa478a9c200789491096e
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
 arch/arm/Kconfig.debug | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index 9e0b5e7f12af..64c1f8a46ab5 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -66,6 +66,8 @@ config UNWINDER_FRAME_POINTER
 config UNWINDER_ARM
 	bool "ARM EABI stack unwinder"
 	depends on AEABI && !FUNCTION_GRAPH_TRACER
+	# https://github.com/ClangBuiltLinux/linux/issues/732
+	depends on !LD_IS_LLD || LLD_VERSION >= 110000
 	select ARM_UNWIND
 	help
 	  This option enables stack unwinding support in the kernel

base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
-- 
2.31.0.rc1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: Make UNWINDER_ARM depend on ld.bfd or ld.lld 11.0.0+
  2021-03-11  0:54 ` Nathan Chancellor
@ 2021-03-11  1:30   ` Nick Desaulniers
  -1 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2021-03-11  1:30 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Russell King, Arnd Bergmann, Linux ARM, LKML, clang-built-linux,
	Mark Brown

On Wed, Mar 10, 2021 at 4:54 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> When linking aspeed_g5_defconfig with ld.lld 10.0.1, the following error
> occurs:
>
> ld.lld: error: .tmp_vmlinux.kallsyms1:(.ARM.exidx+0x34D98): relocation
> R_ARM_PREL31 out of range: 2135538592 is not in [-1073741824,
> 1073741823]
>
> This was resolved in ld.lld 11.0.0 but the minimum supported version of
> ld.lld for the kernel is 10.0.1. Prevent CONFIG_UNWINDER_ARM from being
> selected in this case so that the problematic sections cannot be
> created.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/732
> Link: https://github.com/llvm/llvm-project/commit/48aebfc908ba7b9372aaa478a9c200789491096e
> Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Thanks for the patch.  We discussed at the kernelCI meeting yesterday
and the clangbuiltlinux meeting today continuing coverage for kernel
builds with clang-10, so this is still worthwhile IMO at least for
randconfig testing not to select known broken configs when using older
tools. We can rip it out once we bump the minimum supported version of
clang.

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  arch/arm/Kconfig.debug | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 9e0b5e7f12af..64c1f8a46ab5 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -66,6 +66,8 @@ config UNWINDER_FRAME_POINTER
>  config UNWINDER_ARM
>         bool "ARM EABI stack unwinder"
>         depends on AEABI && !FUNCTION_GRAPH_TRACER
> +       # https://github.com/ClangBuiltLinux/linux/issues/732
> +       depends on !LD_IS_LLD || LLD_VERSION >= 110000
>         select ARM_UNWIND
>         help
>           This option enables stack unwinding support in the kernel
>
> base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
> --

-- 
Thanks,
~Nick Desaulniers

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

* Re: [PATCH] ARM: Make UNWINDER_ARM depend on ld.bfd or ld.lld 11.0.0+
@ 2021-03-11  1:30   ` Nick Desaulniers
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Desaulniers @ 2021-03-11  1:30 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Russell King, Arnd Bergmann, Linux ARM, LKML, clang-built-linux,
	Mark Brown

On Wed, Mar 10, 2021 at 4:54 PM Nathan Chancellor <nathan@kernel.org> wrote:
>
> When linking aspeed_g5_defconfig with ld.lld 10.0.1, the following error
> occurs:
>
> ld.lld: error: .tmp_vmlinux.kallsyms1:(.ARM.exidx+0x34D98): relocation
> R_ARM_PREL31 out of range: 2135538592 is not in [-1073741824,
> 1073741823]
>
> This was resolved in ld.lld 11.0.0 but the minimum supported version of
> ld.lld for the kernel is 10.0.1. Prevent CONFIG_UNWINDER_ARM from being
> selected in this case so that the problematic sections cannot be
> created.
>
> Link: https://github.com/ClangBuiltLinux/linux/issues/732
> Link: https://github.com/llvm/llvm-project/commit/48aebfc908ba7b9372aaa478a9c200789491096e
> Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Thanks for the patch.  We discussed at the kernelCI meeting yesterday
and the clangbuiltlinux meeting today continuing coverage for kernel
builds with clang-10, so this is still worthwhile IMO at least for
randconfig testing not to select known broken configs when using older
tools. We can rip it out once we bump the minimum supported version of
clang.

Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  arch/arm/Kconfig.debug | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
> index 9e0b5e7f12af..64c1f8a46ab5 100644
> --- a/arch/arm/Kconfig.debug
> +++ b/arch/arm/Kconfig.debug
> @@ -66,6 +66,8 @@ config UNWINDER_FRAME_POINTER
>  config UNWINDER_ARM
>         bool "ARM EABI stack unwinder"
>         depends on AEABI && !FUNCTION_GRAPH_TRACER
> +       # https://github.com/ClangBuiltLinux/linux/issues/732
> +       depends on !LD_IS_LLD || LLD_VERSION >= 110000
>         select ARM_UNWIND
>         help
>           This option enables stack unwinding support in the kernel
>
> base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
> --

-- 
Thanks,
~Nick Desaulniers

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-03-11  1:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-11  0:54 [PATCH] ARM: Make UNWINDER_ARM depend on ld.bfd or ld.lld 11.0.0+ Nathan Chancellor
2021-03-11  0:54 ` Nathan Chancellor
2021-03-11  1:30 ` Nick Desaulniers
2021-03-11  1:30   ` Nick Desaulniers

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.