「The Art of Assembly Language」を読んだ後、本に記載されているウェブサイトから高度なアセンブリ言語を習得しました。 .bashrcファイルを編集した後、次のように標準の「Hello world!」プログラムをコンパイルしました。
hla helloworld.hla
このエラーが返されました。
ld: i386 architecture of input file `helloworld.o' is incompatible with
i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(ex_hwExcept.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(ex_Raise.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(ex_buildexcepts.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(ex_InstallSignals.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(ex_abstract.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(ex_excepts.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(ex_dfltexcept.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(so_puts.o)'
is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(str_catu32.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(str_cath32.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(str_cat2.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(str_catd.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(str_cats.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(str_catu64size.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib
/hlalib.a(str_init.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(str_cpy.o)'
is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(linux_write.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(linux_sigaction.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(linux_exit.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_dToStr.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_u64tostr.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_underscores.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_h32ToStr.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(hexTbL.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(fio_puts.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(fio_putssize.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(fileio_write.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(hla_get_set_OutputUnderscores.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(stdoutvars.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_u64tobuf.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv__hexTobuf32Size.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_u64size.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_u32size.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv_h32Size.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv__hexTobuf32.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(hexDigitsData.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(fio__putpad.o)' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `/usr/hla/hlalib/hlalib.a(conv__unsTobuf64.o)' is incompatible with i386:x86-64 output
Error returned by ld = 256
私はLinux x64を使用しており、本ではHLAをx86互換と宣伝しているので、これは互換性エラーのようです。 HLAフラグを見ましたが、それを変更するために設定できるパラメーターはありません。どうですか?
答え1
Google検索64ビットHLAたとえば、以下が見つかりました。このフォーラムの記事これは、32ビットバージョンを実行するためにローダーにオプションを渡すことができることを意味します。
hla -lmelf_i386 -v helloWorld
より多くの議論がありますこのブログ。このような32パッケージをインストールする必要があるかもしれませんglibc.i686
。