]> www.infradead.org Git - users/jedix/linux-maple.git/commit
objtool/powerpc: Add support for decoding all types of uncond branches
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 25 Feb 2025 08:05:49 +0000 (09:05 +0100)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 26 Feb 2025 15:39:43 +0000 (21:09 +0530)
commitbb7f054f4de260dc14813230cfe4ca7299647b6e
tree511aee7b37f32cbcf8d4690381673a578d3246e1
parentd856bc3ac7d9ca88b3f52d8e08e58ce892dc3ce1
objtool/powerpc: Add support for decoding all types of uncond branches

Add support for 'bla' instruction.

This is done by 'flagging' the address as an absolute address so that
arch_jump_destination() can calculate it as expected. Because code is
_always_ 4 bytes aligned, use bit 30 as flag.

Also add support for 'b' and 'ba' instructions. Objtool call them jumps.

And make sure the special 'bl .+4' used by clang in relocatable code is
not seen as an 'unannotated intra-function call'. clang should use the
special 'bcl 20,31,.+4' form like gcc but for the time being it does not
so lets work around that.

Link: https://github.com/llvm/llvm-project/issues/128644
Reviewed-by: Segher Boessenkool <segher@kewrnel.crashing.org>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/bf0b4d554547bc34fa3d1af5b4e62a84c0bc182b.1740470510.git.christophe.leroy@csgroup.eu
tools/objtool/arch/powerpc/decode.c