OS/2, eCS & ArcaOS - Technical > Programming

Alternatives to compiling Rust in Firefox port OS/2

<< < (2/12) > >>

Rob:
What all is required to produce OMF from ELF? Is there a doc to read?

OS4User:

--- Quote from: Dave Yeo on January 07, 2021, 06:12:54 pm --- to produce OMF from ELF

--- End quote ---


--- Quote from: Rob on May 07, 2021, 07:30:56 am ---What all is required to produce OMF from ELF? Is there a doc to read?

--- End quote ---

From my point of view - there is no need to produce OMF from ELF as WLINK, can generate DLL/EXE from ELF (however, it may be necessary to improve WLINK)

Dave Yeo:

--- Quote from: Rob on May 07, 2021, 07:30:56 am ---What all is required to produce OMF from ELF? Is there a doc to read?

--- End quote ---

Here's a program that can do it, https://www.agner.org/optimize/#objconv along with the documentation and source, it builds easy on OS/2, there's a copy on Hobbes.
I'm sure there is also lots of documentation out there on the OMF and the ELF formats.
As OS4User points out, another possibility is just staying with ELF until the linking stage and having a linker that can link ELF objects into LX executables and DLL's. Wlink can handle both file formats, whether it can currently build a LX executable or a DLL out of ELF obj files needs investigation. It's ELF support isn't the highest as it can't even create ELF shared libraries.
Either route needs someone who knows this stuff.

Lars:
Does EMXOMF only convert from AOUT to OMF but not from ELF to OMF ? I thought that if you called gcc with the -Zomf switch that then, OMF objects would he produced ?

Dave Yeo:

--- Quote from: Lars on May 07, 2021, 09:14:44 am ---Does EMXOMF only convert from AOUT to OMF but not from ELF to OMF ? I thought that if you called gcc with the -Zomf switch that then, OMF objects would he produced ?

--- End quote ---

Yes, only AOUT to OMF, with the conversion happening at compile or linking time depending on whether -Zomf is in CFLAGS as well as LDFLAGS. GCC outputs AOUT and then can call emxomf to convert the object files to OMF and we can use the native linker, native debugger etc. There's also tools like emxomfar for creating static OMF libs.
It is also possible to build executables and DLLs directly out of AOUT objects.
The problems with AOUT range from officially unsupported by GCC to just plain old too simple. Doesn't allow much in alignment options for example.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version