크로스 컴파일러(32비트)를 빌드하고 실행하려고 하는데 바이너리를 실행할 수 없습니다.Exec 형식 오류.
file
readelf
32비트 실행 파일이라고 주장하지만 이에 ldd
동의하지 않습니다. 내가 여기서 무엇을 놓치고 있는 걸까요? RedHat 기반 호스트에서도 동일한 절차가 진행됩니다.
$ ./arm-none-linux-gnueabi-gcc -v
bash: ./arm-none-linux-gnueabi-gcc: cannot execute binary file: Exec format error
$ ldd arm-none-linux-gnueabi-gcc
not a dynamic executable
$ file arm-none-linux-gnueabi-gcc
arm-none-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped
$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l
답변1
여기에 답이 있습니다. 32비트 사전 컴파일된 바이너리는 Linux용 Linux 하위 시스템에서 작동하지 않습니다.