ld coff outpurt-format?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
mblock

ld coff outpurt-format?

Post 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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:ld coff outpurt-format?

Post 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.
Every good solution is obvious once you've found it.
mblock

Re:ld coff outpurt-format?

Post 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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:ld coff outpurt-format?

Post 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.
Every good solution is obvious once you've found it.
Post Reply