Description
Bugzilla Link | 43234 |
Version | 8.0 |
OS | Linux |
Blocks | #4440 |
CC | @calixteman,@kbeyls,@nickdesaulniers,@zygoloid,@smithp35,@vedantk |
Extended Description
I got a link error on a 32-bit ARM kernel build with CONFIG_GCOV_KERNEL and CONFIG_UNWIND_FRAME_POINTER set:
kernel/trace/trace_clock.o:(.ARM.exidx+0x0): undefined reference to __aeabi_unwind_cpp_pr0' kernel/trace/trace_clock.o:(.ARM.exidx+0x8): undefined reference to
__aeabi_unwind_cpp_pr0'
kernel/trace/trace_clock.o:(.ARM.exidx+0x10): undefined reference to `__aeabi_unwind_cpp_pr0'
I created a reduced test case at https://godbolt.org/z/gBQtAP
Basically, clang inserts __llvm_gcov_writeout/__llvm_gcov_flush/__llvm_gcov_init functions into any file it compiles, even for an empty C file input. These functions contain .fnstart/.fnend statements even when building with "-fno-omit-frame-pointer -fno-unwind-tables", which then results in unresolved references to __aeabi_unwind_cpp_pr0.