ELKS Executable Formats

Linking

ELKS C source code is compiled by GCC for the IA16 platform ('gcc-ia16') and object & static library files are worked with the BINUTILS ('binutils-ia16'), so using the ELF format.

At link time, custom 'ld' scripts (see '*.ld' files) convert ELF format to legacy 'a.out' format, and drop out all that is not 'code', 'data', 'bbs' and 'rodata'. So the final executable contains neither symbol nor comment.

A.OUT executable

Executable are still using the legacy A.OUT format with splitted I/D option:

A.OUT header

uint32_ttype;
uint32_theader size
uint32_tcode section size (.text)
uint32_tinitialized data section (.data)
uint32_tuninitialized data section (.bss)
uint32_tunused 1
uint32_ttotal data segment size
uint32_tunused 2

ELKS does not use the optional relocation fields as the IA16 code is natively relocatable inside a segment with relative offsets.