看板 Linux 關於我們 聯絡資訊
請問一下 我在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指令 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 218.161.13.208 ※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1449658884.A.7BB.html
CP64: http://goo.gl/4uiLaI google "ld asm with c" 就有了 12/09 21:23
hijkxyzuw: ? 12/09 22:39
hijkxyzuw: 抱歉噓錯篇 12/09 22:44