[PATCH 2/2] z80-elf: support complex relocation symbols
Ismael Luceno
ismael@iodev.co.uk
Fri Oct 24 12:44:17 GMT 2025
On 24/Oct/2025 13:58, Jan Beulich wrote:
<...>
> Hmm, this might have been useful back when there were actually 16-bit programs.
> With the little use of 16-bit code nowadays, I don't expect it would be overly
> useful (but feel free to educate me). Such 16-bit code is commonly embedded in
> bigger 32- or 64-bit binaries (boot loaders, kernels etc), and the 16-bit code then
> often doesn't live at a linked address which matches its final resting place. IOW
> segbase wouldn't be a link-time constant. It may not even be a load-time constant,
> as that code (see e.g. Linux'es and Xen's real-mode trampolines) still needs moving
> into an available low-memory location, which is runtime determined.
I'd say this is useful when writting x86 firmware, 16-bit code is
unavoidable for things like the bootblock, early firmware startup, and
the SMM code at the very least. Unfortunately, so far the only option
has been legacy or custom formats.
More information about the Binutils
mailing list