http://sourceware.org/bugzilla/show_bug.cgi?id=12565

--- Comment #17 from Nick Clifton <nickc at redhat dot com> 2011-07-01 12:52:14 
UTC ---
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

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to