I use nasm and I have the gnu linker. What I want to do is link my main program file with a file containing procedures and then output a flat binary file. Since I can't use nasm to make binary files with EXTERN's in the source I figured I could assemble them to intermediate object files and use ld to link them. I tried to assemble both files aout type object files and use the command:
ld -oformat=binary -e start -o main.bin main.o procs.o
Problem is, the file ends up over 4kb when it should be exactly 512 bytes.
I just want to link with the procedures I use in my source and not the entire file.
tyvm in advance