[cfe-dev] PE/COFF for MIPS

Simon Atanasyan via cfe-dev cfe-dev at lists.llvm.org
Mon Feb 24 01:50:18 PST 2020


I think it's a rather difficult task. We need to create COFF object
file writer for MIPS backend and support linking of COFF files in LLD
linker. Now MIPS backend expects ELF output format only. For COFF we
also have to change a code generator because some features cannot be
implemented in COFF.

On Mon, Feb 24, 2020 at 5:41 AM valerij zaporogeci via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> Hi. Is it possible to have a clang/llvm build that both would support
> MIPS architecture and PE/COFF format for object files and executables?
> without the need to change the code base, of course. just with proper
> configuration. So that one can use PE DLL import/export for modules
> instead of ELF shared objects. Initially I have been thinking on
> creating an ELF->PE translator, but it quickly became obvious, that
> it's not practical - because it's the compiler, that needs to
> understand declspec(dllimport/dllexport).
> I am not a compiler guy, so making changes in such huge projects as
> gcc or clang are out of my scope. I am working on firmware/osdev hobby
> projects for a mips32r2 board (among ARM ones) and would be very happy
> to use such a familiar, useful and handy PE/COFF format for
> executables.

Simon Atanasyan

More information about the cfe-dev mailing list