[llvm-bugs] [Bug 43234] New: ARM: extraneous unwinder reference with -fprofile-arcs

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 6 02:54:52 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=43234

            Bug ID: 43234
           Summary: ARM: extraneous unwinder reference with -fprofile-arcs
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arnd at linaro.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190906/2ed60404/attachment-0001.html>


More information about the llvm-bugs mailing list