[PATCH 2/2] z80-elf: support complex relocation symbols

H. Peter Anvin hpa@zytor.com
Thu Nov 20 02:40:21 GMT 2025
On November 19, 2025 4:39:36 PM PST, "Maciej W. Rozycki" <macro@orcam.me.uk> wrote:
>On Mon, 17 Nov 2025, H. Peter Anvin wrote:
>
>> Modern systems, with flat memory spaces and dynamic linking — the ones 
>> for which ELF would typically be a native format — tend not to need 
>> these hacks, but I could see things like waiting to load __bss_end - 
>> __bss_start into a register on an embedded system where the OS doesn't 
>> clear bss for you. It's it important? Probably not, but it might be 
>> nice.
>
> Well, even the Linux kernel does it itself at boot (i.e. clearing the BSS 
>at entry), obviously being just another bare metal app, although some bare 
>metal loaders included with monitor firmware that are used to start Linux 
>are developed enough to do it before passing control, such as ones that 
>talk ELF.
>
>  Maciej

I meant "does it matter" in the sense that the bloat to do the arithmetic at runtime is quite minor.


More information about the Binutils mailing list