gcc -m32 error with files not found
Peng Yu
pengyu.ut at gmail.com
Sun Oct 2 00:35:48 UTC 2016
Hi, I got the following error when I try to run gcc -m32. Does anybody
know what the problem is?
~$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l
~$ cat tiny.asm
BITS 32
GLOBAL main
SECTION .text
main:
mov eax, 42
ret
~$ nasm -f elf tiny.asm
~$ gcc -m32 -Wall -s tiny.o
/usr/bin/ld: cannot find crt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for
-lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find -lc
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-linux-gnu/4.8/libgcc_s.so when searching for
-lgcc_s
/usr/bin/ld: cannot find -lgcc_s
/usr/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
--
Regards,
Peng
More information about the ubuntu-users
mailing list