[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug ld/12565] NOLOAD sections empty

From: Nick Clifton
Subject: Re: [Bug ld/12565] NOLOAD sections empty
Date: Fri, 01 Jul 2011 13:51:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]