[PATCH 1/2] objtool: improve rare switch jump table pattern detection

2016-10-13 Thread Josh Poimboeuf
gcc 6 added a new switch statement jump table optimization which makes objtool's life harder. It looks like: mov [rodata addr],%reg1 ... some instructions ... jmpq *(%reg1,%reg2,8) The optimization is quite rare, but objtool still needs to be able to identify the pattern so that it can

[PATCH 1/2] objtool: improve rare switch jump table pattern detection

2016-10-13 Thread Josh Poimboeuf
gcc 6 added a new switch statement jump table optimization which makes objtool's life harder. It looks like: mov [rodata addr],%reg1 ... some instructions ... jmpq *(%reg1,%reg2,8) The optimization is quite rare, but objtool still needs to be able to identify the pattern so that it can