Messages in this thread | | | From | Arnd Bergmann <> | Date | Fri, 3 Mar 2017 00:01:25 +0100 | Subject | Re: [PATCH] objtool: fix another gcc jump table detection issue |
| |
On Thu, Mar 2, 2017 at 11:57 PM, Josh Poimboeuf <jpoimboe@redhat.com> wrote: > > Arnd Bergmann reported a (false positive) objtool warning: > > drivers/infiniband/sw/rxe/rxe_resp.o: warning: objtool: rxe_responder()+0xfe: sibling call from callable instruction with changed frame pointer > > The issue is in find_switch_table(). It tries to find a switch > statement's jump table by walking backwards from an indirect jump > instruction, looking for a relocation to the .rodata section. In this > case it stopped walking prematurely: the first .rodata relocation it > encountered was for a variable (resp_state_name) instead of a jump > table, so it just assumed there wasn't a jump table. > > The fix is to ignore any .rodata relocation which refers to an ELF > object symbol. This works because the jump tables are anonymous and > have no symbols associated with them. > > Reported-by: Arnd Bergmann <arnd@arndb.de> > Fixes: 3732710ff6f2 ("objtool: Improve rare switch jump table pattern detection") > Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Tested-by: Arnd Bergmann <arnd@arndb.de>
| |