读完《汇编语言的艺术》后,我从书中列出的网站获得了高级汇编语言。编辑 .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 标志,没有可以设置的参数来更改此设置。我能做些什么?