assembly - gnu linker: file not recognized -


this makefile:

obj =init3.o initfunc.o descriptor.o disk.o  init:$(obj)      ld -o init.out $(obj)  init3.o:init3.asm         nasm -f aout init3.asm  initfunc.o:initfunc.asm         nasm -f aout  initfunc.asm  descriptor.o:../lib/descriptor.asm     nasm -f aout  ../lib/descriptor.asm  disk.o:../drive/disk.asm     nasm -f aout  ../drive/disk.asm 

they compiled totally nothing wrong,but when linker started link,an error came out:file not recognized: file format not recognized. change every file elf format using -f elf,the error still there,i googled gun linker recognize .out format,so what's wrong code?

fwiw: delete .o files before re-running make. easy forget after adjusting compiler flags. (i'm talking experience here...)

explanation: adjusting makefile not enforce recompilation (unless specify makefile dependency in every rule in makefile; may not such bad idea). chances linking same old object files on , on again.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -