[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200218195705.GA10545@ubuntu-m2-xlarge-x86>
Date: Tue, 18 Feb 2020 12:57:05 -0700
From: Nathan Chancellor <natechancellor@...il.com>
To: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>,
Nick Desaulniers <ndesaulniers@...gle.com>
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@...gle.com>
> Tested-by: Nick Desaulniers <ndesaulniers@...gle.com>
> Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.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@...il.com>
Powered by blists - more mailing lists