* [PATCH] ARM: fix link warning with XIP + frame-pointer
@ 2021-01-12 15:46 Arnd Bergmann
2021-01-12 16:27 ` Nathan Chancellor
2021-01-12 20:27 ` Kees Cook
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2021-01-12 15:46 UTC (permalink / raw)
To: Russell King, Nathan Chancellor, Nick Desaulniers, Kees Cook
Cc: Arnd Bergmann, Catalin Marinas, Vladimir Murzin,
linux-arm-kernel, linux-kernel, clang-built-linux
From: Arnd Bergmann <arnd@arndb.de>
When frame pointers are used instead of the ARM unwinder,
and the kernel is built using clang with an external assembler
and CONFIG_XIP_KERNEL, every file produces two warnings
like:
arm-linux-gnueabi-ld: warning: orphan section `.ARM.extab' from `net/mac802154/util.o' being placed in section `.ARM.extab'
arm-linux-gnueabi-ld: warning: orphan section `.ARM.exidx' from `net/mac802154/util.o' being placed in section `.ARM.exidx'
The same fix was already merged for the normal (non-XIP)
linker script, with a longer description.
Fixes: c39866f268f8 ("arm/build: Always handle .ARM.exidx and .ARM.extab sections")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/kernel/vmlinux-xip.lds.S | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
index 4d0b0cd9222e..ddb70c65d525 100644
--- a/arch/arm/kernel/vmlinux-xip.lds.S
+++ b/arch/arm/kernel/vmlinux-xip.lds.S
@@ -43,6 +43,10 @@ SECTIONS
ARM_DISCARD
*(.alt.smp.init)
*(.pv_table)
+#ifndef CONFIG_ARM_UNWIND
+ *(.ARM.exidx) *(.ARM.exidx.*)
+ *(.ARM.extab) *(.ARM.extab.*)
+#endif
}
. = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
--
2.29.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: fix link warning with XIP + frame-pointer
2021-01-12 15:46 [PATCH] ARM: fix link warning with XIP + frame-pointer Arnd Bergmann
@ 2021-01-12 16:27 ` Nathan Chancellor
2021-01-12 20:27 ` Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2021-01-12 16:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Russell King, Nick Desaulniers, Kees Cook, Arnd Bergmann,
Catalin Marinas, Vladimir Murzin, linux-arm-kernel, linux-kernel,
clang-built-linux
On Tue, Jan 12, 2021 at 04:46:40PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When frame pointers are used instead of the ARM unwinder,
> and the kernel is built using clang with an external assembler
> and CONFIG_XIP_KERNEL, every file produces two warnings
> like:
>
> arm-linux-gnueabi-ld: warning: orphan section `.ARM.extab' from `net/mac802154/util.o' being placed in section `.ARM.extab'
> arm-linux-gnueabi-ld: warning: orphan section `.ARM.exidx' from `net/mac802154/util.o' being placed in section `.ARM.exidx'
>
> The same fix was already merged for the normal (non-XIP)
> linker script, with a longer description.
>
> Fixes: c39866f268f8 ("arm/build: Always handle .ARM.exidx and .ARM.extab sections")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> arch/arm/kernel/vmlinux-xip.lds.S | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S
> index 4d0b0cd9222e..ddb70c65d525 100644
> --- a/arch/arm/kernel/vmlinux-xip.lds.S
> +++ b/arch/arm/kernel/vmlinux-xip.lds.S
> @@ -43,6 +43,10 @@ SECTIONS
> ARM_DISCARD
> *(.alt.smp.init)
> *(.pv_table)
> +#ifndef CONFIG_ARM_UNWIND
> + *(.ARM.exidx) *(.ARM.exidx.*)
> + *(.ARM.extab) *(.ARM.extab.*)
> +#endif
> }
>
> . = XIP_VIRT_ADDR(CONFIG_XIP_PHYS_ADDR);
> --
> 2.29.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: fix link warning with XIP + frame-pointer
2021-01-12 15:46 [PATCH] ARM: fix link warning with XIP + frame-pointer Arnd Bergmann
2021-01-12 16:27 ` Nathan Chancellor
@ 2021-01-12 20:27 ` Kees Cook
1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2021-01-12 20:27 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Russell King, Nathan Chancellor, Nick Desaulniers, Arnd Bergmann,
Catalin Marinas, Vladimir Murzin, linux-arm-kernel, linux-kernel,
clang-built-linux
On Tue, Jan 12, 2021 at 04:46:40PM +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When frame pointers are used instead of the ARM unwinder,
> and the kernel is built using clang with an external assembler
> and CONFIG_XIP_KERNEL, every file produces two warnings
> like:
>
> arm-linux-gnueabi-ld: warning: orphan section `.ARM.extab' from `net/mac802154/util.o' being placed in section `.ARM.extab'
> arm-linux-gnueabi-ld: warning: orphan section `.ARM.exidx' from `net/mac802154/util.o' being placed in section `.ARM.exidx'
>
> The same fix was already merged for the normal (non-XIP)
> linker script, with a longer description.
>
> Fixes: c39866f268f8 ("arm/build: Always handle .ARM.exidx and .ARM.extab sections")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
--
Kees Cook
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-12 21:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 15:46 [PATCH] ARM: fix link warning with XIP + frame-pointer Arnd Bergmann
2021-01-12 16:27 ` Nathan Chancellor
2021-01-12 20:27 ` Kees Cook
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).