[PATCH] D106056: [CVP] processSwitch: Remove default case when switch cover all possible values.
JunMa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 23 18:15:20 PDT 2021
junparser added a comment.
In D106056#2961447 <https://reviews.llvm.org/D106056#2961447>, @nathanchance wrote:
> I do not think that is the issue here. Adding `-mllvm -trap-unreachable` to the kernel's build flags does not silence `objtool` nor allows the kernel to boot. I switched over to `CONFIG_UNWINDER_FRAME_POINTER` instead of `CONFIG_UNWINDER_ORC` so `objtool` should only be running checks, not doing any sort of binary modifications, and I see the same warning. If the warning is not valid, then I can bring that up to the tool's author but it seems valid, given that it is pointing to the exact function that @junparser already identified as problematic.
>
> + tools/objtool/objtool check --duplicate --vmlinux --no-unreachable --retpoline --uaccess vmlinux.o
> vmlinux.o: warning: objtool: cfg80211_edmg_chandef_valid()+0x16e: can't find jump dest instruction at .text.cfg80211_edmg_chandef_valid+0x180
@nathanchance I can confirm that @efriedma is right. since we are using lto, we need add `-mllvm -trap-unreachable` to link flags as well. After that we can see `ud2 `at the jump dest, then there is no warning from libtool, also boot has been succeed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106056/new/
https://reviews.llvm.org/D106056
More information about the llvm-commits
mailing list