I have several stripped ARM binaries, which can't be correctly disassembled by llvm-objdump, because they intermix code with data. For instance compiling and disassembling this file:
.text b l0 .inst 0xffffffff l0:
results in this output:
$a.0: 0: 00 00 00 ea b #0 <l0> 4: ff <unknown> 5: ff ff ff 00 ldrshteq pc, [pc], #255
and after applying this patch the result is the same as GNU objdump has:
$a.0: 0: 00 00 00 ea b #0 <l0> 4: ff ff ff ff <unknown>
This happens because ARMDisasembler returns zero size when it fails to parse an instruction. On the contrary AArch64Disassembler always returns 4, so aarch64 binaries are disassembled correctly.