* [PATCH] ARM: use ARM unwinder for gcov
@ 2020-05-05 14:11 Arnd Bergmann
2020-05-05 14:19 ` Russell King - ARM Linux admin
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2020-05-05 14:11 UTC (permalink / raw)
To: Russell King
Cc: Arnd Bergmann, Nathan Huckleberry, linux-arm-kernel,
linux-kernel, clang-built-linux
Using gcov on ARM fails when the frame pointer unwinder is used:
arm-linux-gnueabi-ld: kernel/softirq.o:(.ARM.exidx+0x120): undefined reference to `__aeabi_unwind_cpp_pr0'
arm-linux-gnueabi-ld: init/main.o:(.ARM.exidx+0x98): undefined reference to `__aeabi_unwind_cpp_pr0'
arm-linux-gnueabi-ld: init/version.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
arm-linux-gnueabi-ld: init/do_mounts.o:(.ARM.exidx+0x28): undefined reference to `__aeabi_unwind_cpp_pr0'
arm-linux-gnueabi-ld: init/do_mounts_initrd.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
arm-linux-gnueabi-ld: init/initramfs.o:(.ARM.exidx+0x8): more undefined references to `__aeabi_unwind_cpp_pr0' follow
This is likely a bug in clang that should be fixed in the compiler.
Forcing the use of the ARM unwinder in this configuration however
works around the problem.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/arm/Kconfig.debug | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index a1dfb04231fd..41ef58acabf7 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -56,7 +56,7 @@ choice
config UNWINDER_FRAME_POINTER
bool "Frame pointer unwinder"
- depends on !THUMB2_KERNEL
+ depends on !THUMB2_KERNEL && !(CC_IS_CLANG && GCOV_KERNEL)
select ARCH_WANT_FRAME_POINTERS
select FRAME_POINTER
help
--
2.26.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: use ARM unwinder for gcov
2020-05-05 14:11 [PATCH] ARM: use ARM unwinder for gcov Arnd Bergmann
@ 2020-05-05 14:19 ` Russell King - ARM Linux admin
2020-05-05 14:42 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Russell King - ARM Linux admin @ 2020-05-05 14:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Nathan Huckleberry, linux-arm-kernel, linux-kernel, clang-built-linux
On Tue, May 05, 2020 at 04:11:56PM +0200, Arnd Bergmann wrote:
> Using gcov on ARM fails when the frame pointer unwinder is used:
>
> arm-linux-gnueabi-ld: kernel/softirq.o:(.ARM.exidx+0x120): undefined reference to `__aeabi_unwind_cpp_pr0'
> arm-linux-gnueabi-ld: init/main.o:(.ARM.exidx+0x98): undefined reference to `__aeabi_unwind_cpp_pr0'
> arm-linux-gnueabi-ld: init/version.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> arm-linux-gnueabi-ld: init/do_mounts.o:(.ARM.exidx+0x28): undefined reference to `__aeabi_unwind_cpp_pr0'
> arm-linux-gnueabi-ld: init/do_mounts_initrd.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> arm-linux-gnueabi-ld: init/initramfs.o:(.ARM.exidx+0x8): more undefined references to `__aeabi_unwind_cpp_pr0' follow
>
> This is likely a bug in clang that should be fixed in the compiler.
> Forcing the use of the ARM unwinder in this configuration however
> works around the problem.
Or should the stub functions in arch/arm/kernel/unwind.c be moved out?
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ARM: use ARM unwinder for gcov
2020-05-05 14:19 ` Russell King - ARM Linux admin
@ 2020-05-05 14:42 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2020-05-05 14:42 UTC (permalink / raw)
To: Russell King - ARM Linux admin
Cc: Nathan Huckleberry, Linux ARM, linux-kernel, clang-built-linux
On Tue, May 5, 2020 at 4:19 PM Russell King - ARM Linux admin
<linux@armlinux.org.uk> wrote:
>
> On Tue, May 05, 2020 at 04:11:56PM +0200, Arnd Bergmann wrote:
> > Using gcov on ARM fails when the frame pointer unwinder is used:
> >
> > arm-linux-gnueabi-ld: kernel/softirq.o:(.ARM.exidx+0x120): undefined reference to `__aeabi_unwind_cpp_pr0'
> > arm-linux-gnueabi-ld: init/main.o:(.ARM.exidx+0x98): undefined reference to `__aeabi_unwind_cpp_pr0'
> > arm-linux-gnueabi-ld: init/version.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> > arm-linux-gnueabi-ld: init/do_mounts.o:(.ARM.exidx+0x28): undefined reference to `__aeabi_unwind_cpp_pr0'
> > arm-linux-gnueabi-ld: init/do_mounts_initrd.o:(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0'
> > arm-linux-gnueabi-ld: init/initramfs.o:(.ARM.exidx+0x8): more undefined references to `__aeabi_unwind_cpp_pr0' follow
> >
> > This is likely a bug in clang that should be fixed in the compiler.
> > Forcing the use of the ARM unwinder in this configuration however
> > works around the problem.
>
> Or should the stub functions in arch/arm/kernel/unwind.c be moved out?
I had not realized this is only a stub. Moving them out should fix the
link failure, I can
send a patch after testing if we are sure that calling them is not a
bug in clang
that would lead to runtime failures.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-05 14:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 14:11 [PATCH] ARM: use ARM unwinder for gcov Arnd Bergmann
2020-05-05 14:19 ` Russell King - ARM Linux admin
2020-05-05 14:42 ` Arnd Bergmann
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).