Page 1 of 1

ld coff outpurt-format?

Posted: Wed Jun 30, 2004 2:34 pm
by mblock
hi,

i want to write a module loader. i want to use the common object file format for my kernel modules.... but how can i create them? :) i can directly assemble a assembler program with nasm using coff as output-format but i want to program my modules in c :)
is there a ld-version which supports the coff-format? or do you know another good linker?

thx
mblock

Re:ld coff outpurt-format?

Posted: Thu Jul 01, 2004 6:16 am
by Solar
ld can be build to support just about every target architecture and file format. Whether or not your readily available ld supports COFF, or whether you have to build a custom one, depends on your build platform.

Re:ld coff outpurt-format?

Posted: Thu Jul 01, 2004 7:05 am
by mblock
wow cool :)

and how can i do this?
i already downloaded and installed the binutils... what should i do to get coff-support?

thx
mblock

Re:ld coff outpurt-format?

Posted: Thu Jul 01, 2004 8:02 am
by Solar
Most simply by building a cross-compiler environment (highly recommended for OS development work anyway) and specifying a COFF target instead of the ELF target as written in the tutorial I just linked. That will not only give you a COFF ld, but a COFF as and COFF GCC, as well.