请问一下 我在ubuntu 14版 64位元下 想要用ld 连结两个 .o档案
foo.o是C语言 bar.o是组语编出来的 我想要连结两个档案
输入 ld -s -o foobar foo.o bar.o
发生下面的问题
ld: i386 architecture of input file `foo.o' is
incompatible with i386:x86-64 output
爬网络改起来是要改用 elf_i386 于是改为
ld -m elf_i386 -s -o foobar foo.o bar.o
一样还是有相同的问题
但是单独使用
ld -m elf_i386 -o hello hello.o 这样可以
想问一下两个档案要怎么使用ld指令
谢谢