0

64 ビット コードをアセンブルしようとしていますが、次の行でアセンブルが失敗します。

addq $0xffffff7fc0005000, %rax

エラーで:

「add」のエラー オペランド タイプの不一致

最初のオペランドは 64 ビット値で、後者は適切にアセンブルする必要があるレジスタです。この命令の前に.code64疑似演算があります。で組み立てています

x86_64-elf-as test.s -o test.o --64

アセンブラ自体については、呼び出されると次の--versionように返されます。

GNU assembler (GNU Binutils) 2.32
Copyright (C) 2019 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-elf'.
4

1 に答える 1