How to make the objdump disassembled code work with gas?
Jan Beulich
jbeulich@suse.com
Wed Apr 28 06:19:17 GMT 2021
On 28.04.2021 04:05, Peng Yu via Binutils wrote:
> I got the following intel syntax assembly code.
>
> $ objdump -w -d -M intel -- 1.o
> ...
> 0: 0f 1f 44 00 00 nop DWORD PTR [rax+rax*1+0x0]
>
> When I try to use the same code with gas, it shows the following
> error. How to make it work?
>
> $ cat 2.asm
> .intel_syntax
> nop DWORD PTR [rax+rax*1+0x0]
> $ as 2.asm
> 2.asm: Assembler messages:
> 2.asm:2: Error: invalid operands (*UND* and *ABS* sections) for `*'
To omit the leading % characters on register names, you need
.intel_syntax noprefix
Jan
More information about the Binutils
mailing list