Hi H.J.
Also, as far as I can see, this behaviour is not documented anywhere.
Do you know of any applications that rely upon this feature ?
NOLOAD means "don't load into memory", which maps to NOBITS.
Otherwise, it will be loaded into memory.
OK, I now get that NOLOAD is effectively a marker for .bss type sections.
But it does seem to me that the linker should be aware that users might
think that NOLOAD means: "do not load the contents of this section from
the file into the running image", rather than its real meaning (for ELF
based targets) of "do not give this section any space in the output
file; if present in the running image, initialise its contents with zero".
Hence I now think that we should update the documentation to more
properly describe the behaviour of NOLOAD and that we should fix the
linker so that it issues a warning message whenever it throws away
non-zero contents of an input section being mapped to a NOLOAD output
section.
Cheers
Nick
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils