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

            Bug ID: 39531
           Summary: KCOV broke when LTO enabled: inlinable function call
                    in a function with debug info must have a !dbg
                    location
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

Created attachment 21069
  --> https://bugs.llvm.org/attachment.cgi?id=21069&action=edit
IR for kcov.c which contains __sanitizer_cov_trace_pc

When I'm building linux kernel with clang and LTO enabled for CONFIG_KOV=y, I'm
facing below error: (I added --verbose to ld in order to show where it stopped)

The make failed at ld stage inside kernel/script/link-vmlinux.sh:  ${LD}
--verbose ${LDFLAGS} -r -o ${1} $(modversions) ${objects}


==Build Log==
aarch64-linux-android-ld.gold: Closed descriptor 11 for
"net/ipc_router/ipc_router_socket.o"
aarch64-linux-android-ld.gold: Opened new descriptor 12 for
"net/ipc_router/ipc_router_security.o"
aarch64-linux-android-ld.gold: Attempt to open
net/ipc_router/ipc_router_security.o succeeded
aarch64-linux-android-ld.gold: Unlocking file
"net/ipc_router/ipc_router_security.o"
aarch64-linux-android-ld.gold: Released descriptor 12 for
"net/ipc_router/ipc_router_security.o"
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
inlinable function call in a function with debug info must have a !dbg location
  call void @__sanitizer_cov_trace_pc()
LLVM ERROR: Broken module found, compilation aborted!
make[1]: *** [vmlinux] Error 1
make[1]: Leaving directory
`/local/mnt/workspace/jiangenj/la/asan/out/target/product/msm8953_64/obj/kernel/msm-4.9'
make: *** [sub-make] Error 2
make: Leaving directory `/local/mnt/workspace/jiangenj/la/asan/kernel/msm-4.9'
ninja: build stopped: subcommand failed.
16:18:10 ninja failed with: exit status 1


Can you help me understand what the issue is actually and how to fix?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to