Kali Linux Rolling의 높은 수준의 어셈블리 비호환성

Kali Linux Rolling의 높은 수준의 어셈블리 비호환성

"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

구글 검색64비트 HLA예를 들어, 다음이 발견되었습니다.이 포럼 기사이는 32비트 버전을 실행하기 위해 로더에 옵션을 전달할 수 있음을 의미합니다.

hla -lmelf_i386 -v helloWorld

더 많은 논의가 있습니다이 블로그. 이와 같은 32 패키지를 설치해야 할 수도 있습니다 glibc.i686.

관련 정보