nasm(1) works and spits out an object file in a.out format.
How can I link it into an executable on FreeBSD?
gcc(1) does not recognize the format I have used in the Makefile:
There are some mentions of using ELF format, but why should I when a.out is the native format for BSD? http://www.int80h.org/bsdasm/
How can I link it into an executable on FreeBSD?
Code:
all: a.o
gcc -ggdb -o a a.out
a.o: a.asm
nasm a.asm -f aoutb -g -o a.out
clean:
rm a.out a
Code:
make
nasm a.asm -f aoutb -g -o a.out
gcc -ggdb -o a a.out
a.out: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
*** Error code 1
Stop.
make: stopped in /usr/home/leo/Compile/asm/example1
There are some mentions of using ELF format, but why should I when a.out is the native format for BSD? http://www.int80h.org/bsdasm/