powerpc: unrel_branch_check.sh: enable the use of llvm-objdump v9, 10 or 11
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Aug 2020 08:10:36 +0000 (18:10 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 2 Sep 2020 01:00:22 +0000 (11:00 +1000)
commit6b1992bcdee8b86a74362192d4d8906731918bcc
tree4d69da43d6002e0611b4a7ae39b8c1d810af8f85
parentb71dca9891b330d5c2d3ff5d41704aa6f64f8e32
powerpc: unrel_branch_check.sh: enable the use of llvm-objdump v9, 10 or 11

Currently, using llvm-objtool, this script just silently succeeds without
actually do the intended checking.  So this updates it to work properly.

Firstly, llvm-objdump does not add target symbol names to the end
of branches in its asm output, so we have to drop the branch to
__start_initialization_multiplatform using its address.

Secondly, v9 and 10 specify branch targets as .+<offset>, so we convert
those to actual addresses.

Thirdly, v10 and 11 error out on a vmlinux if given the -R option
complaining that it is "not a dynamic object".  The -R does not make
any difference to the asm output, so remove it.

Lastly, v11 produces asm that is very similar to Gnu objtool (at least
as far as branches are concerned), so no further changes are necessary
to make it work.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200812081036.7969-3-sfr@canb.auug.org.au
arch/powerpc/tools/unrel_branch_check.sh