[cfe-dev] PE/COFF for MIPS

valerij zaporogeci via cfe-dev cfe-dev at lists.llvm.org
Tue Feb 25 16:14:45 PST 2020


Thank you all for your replies.

To David.
>  If this is for a hobby OS, what are the requirements?
The requirement would be "pretty much the same as Windows NT for MIPS has".

To Chris.
> If you have a choice in the matter, just use ELF. It’s the most well-trod path.
Let's take shared objects. I want to make the kernel modular - not
with just object files delay-linked, but as real modules which can
import/export and be easily loaded, unloaded. they would be loaded
into "the same" kernel part of any process address space, why do I
need PIC? it's just a waste of CPU in this situation. there no
advantage of having them PIC. but can I make shared objects non PIC?
still capable of importing from and exporting to other modules - not
just kernel, with interdepencies, is it possible with such imaginable
ELF non-PIC shared objects? If I will use ELF "executable" for them, I
frankly have no idea of how then make them import/export without ugly
trickery. Of course, I lack skilled knowledge of all the nuances of
ELF, maybe it's doable and I hope so, as a temporary solution, it
still looks much optimistic than modifying clang/llvm, which I'd
happily do if it weren't a gigantic thing one needs to spend a lot of
time staring at just to have a slight idea of its nature.

My OS is going to be NT-like and have WinAPI-like environment. So,
it's like Windows appeared again on MIPS, right. :D would it be too
hard for one to "look how it's done for the x86 and generilze
farther"? Actually, it was my initial question, I just forgot to say
that the platform is "like Windows".

And yet. Say, I reached the stage, where I want to bring a compiler
for my OS. Is clang/llvm friendlier to WinAPI platforms, than gcc for
porting to a WinAPI-like environment? meaning does this port relies on
WinAPI in as much respects as any native program would have, written
for that API or does it demand that the environment looked like POSIX?
I mean, why gcc needs those MinGW/Cygwin stuff instead of just using
what is on the platform - after all a compiler requires not much from
the host system.


More information about the cfe-dev mailing list