Messages in this thread | | | Date | Tue, 18 Feb 2020 12:57:05 -0700 | From | Nathan Chancellor <> | Subject | Re: [PATCH 1/2] objtool: Fix clang switch table edge case |
| |
On Mon, Feb 17, 2020 at 09:41:53PM -0600, Josh Poimboeuf wrote: > Clang has the ability to create a switch table which is not a jump > table, but is rather a table of string pointers. This confuses objtool, > because it sees the relocations for the string pointers and assumes > they're part of a jump table: > > drivers/ata/sata_dwc_460ex.o: warning: objtool: sata_dwc_bmdma_start_by_tag()+0x3a2: can't find switch jump table > net/ceph/messenger.o: warning: objtool: ceph_con_workfn()+0x47c: can't find switch jump table > > Make objtool's find_jump_table() smart enough to distinguish between a > switch jump table (which has relocations to text addresses in the same > function as the original instruction) and other anonymous rodata (which > may have relocations to elsewhere). > > Link: https://github.com/ClangBuiltLinux/linux/issues/485 > Reported-by: Nick Desaulniers <ndesaulniers@google.com> > Tested-by: Nick Desaulniers <ndesaulniers@google.com> > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested with clang-11 and binutils 2.34, a combo that was previously broken and I no longer see these warnings on either defconfig or allyesconfig.
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
| |