Skip to content

Cool Project supporting ELKS formats! #1

@ghaerr

Description

@ghaerr

Hello @BinaryMelodies,

Just happened to run across your new project, pretty cool!! As it turns out, I'm pretty interested in a linker that might be able to do what it seems where you're going with RetroLinker.

In particular, at ELKS we're now dealing with three different object file formats and two executable formats: the kernel and main applications are compiled with ia16-elf-gcc using a modified 16-bit version of the 32-bit ELF format, post-processed by elf2elks and producing the ELKS a.out executable.

We more recently added support for OpenWatcom C with all its memory models and supporting more than a single code and data segment. For that, I extended the kernel to load 16-bit OS/2 NE format executables, with any number of code/data segments. We're using OWC's .obj (OMF) format object files and the wlink linker to produce the OS/2 NE executable, and the ELKS C library is also ported.

Just recently, we ported an 8086-toolchain as a host and native ELKS C compiler, which produces NASM or AS86 assembly source output producing the AS86 Introl-format .o object file format. I've gotten familiar with the AS86 .o format despite no documentation. That was then combined with the old dev86 as and ld (AS86 and LD86), for which a number of bug fixes and enhancements were added and LD86 used to an ELKS separate I&D a.out executable.

I'm now at the point of producing various disassemblers, object file dumpers, exe file dumpers and other utilities to better work with all these object and executable formats on the host and ELKS. These are mostly in the elks/tools/objtools/ directory in the ELKS repo, and 8086-toolchain/. I'm also revamping the ELKS a.out symbol table format to the older version used by LD86, although that's still restricted to 8 characters max.

Right now the 8086-toolchain is limited to using dev86 ld (LD86) as the linker, which is working well since its pretty simple but only works with AS86-compatible Introl-format .o files. This pretty much restricts the ability to use assembly source from OWC and other assemblers, and we've now got 3+ assembly source language variants to deal with.

So I remain interested in what you're doing! :)

On a separate note, I noticed on your ELKS fork commit 650a44ea5094c654c63191595ab3158cebf79a46 you updated some system calls and added ELKS_COMBID to elksemu. Would you like those changes added upstream? They look useful and would love to have them, although I don't know exactly why you've had to modify the brk system call operation. I'm assuming your linker is producing the ELKS_COMBID a.out variant also?

Anyways, thank you for a very interesting project. I am also interested in helping document AS86 .o file format and/or continue to develop other tools for inspection of the various object and executable file formats you're working with for RetroLinker.

Thank you!

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions