You copied the Doc URL to your clipboard.

Disassembling SVE object files

Use the llvm-objdump tool with the SVE target feature enabled to display the details and contents of an ELF-format binary file. This includes disassembly of the text section of an object containing SVE instructions.


fromelf does not support disassembly of object files containing SVE instructions.

To disassemble an ELF-format object file containing SVE instructions, use llvm-objdump with the -disassemble option and the SVE target feature enabled:

llvm-objdump -disassemble -mattr=+sve example1.o
example1.o:     file format ELF64-aarch64-little
Disassembly of section .text:
       0:	00 00 b2 d2	mov	    x0, #2415919104
       4:	e8 03 1f aa	mov	    x8, xzr
       8:	e0 e3 98 25	ptrue	  p0.s
       c:	80 c2 90 05	fmov	   z0.s, p0/m, #5.00000000
      10:	ea 03 16 32	orr	    w10, wzr, #0x400

      14:	00 40 48 e5	st1w	   {z0.s}, p0, [x0, x8, lsl #2]
      18:	e8 e3 b0 04	incw	   x8
      1c:	00 15 aa 25	whilelt	p0.s, x8, x10
      20:	a1 ff ff 54	   #-12
      24:	e0 03 1f 2a	mov	    w0, wzr
      28:	c0 03 5f d6	ret


Ensure that the ARM Compiler 6 bin directory is earlier in your path than any system installation of llvm-objdump.

The command-line options in this example are:

-disassemble (or -d)
Disassemble the .text section of the object file, displaying assembler mnemonics for the machine instructions.
Enables the SVE target feature. This option is required to correctly disassemble SVE instructions.
Input ELF-format object file.