SEC_NEVER_LOAD cleanup

Kai Tietz ktietz70@googlemail.com
Tue Oct 19 15:05:00 GMT 2010


2010/10/18 Kai Tietz <ktietz70@googlemail.com>:
> 2010/10/18 Alan Modra <amodra@gmail.com>:
>> On Mon, Oct 18, 2010 at 08:21:56AM +0200, Kai Tietz wrote:
>>> According to pe-coff specification NOLOAD means that a section has
>>> neither allocation nor the load flag set. For example .debug* or
>>> .metadata sections have this style described in pe-coff specification.
>>> They are part of the image without being mapped into process-memory on
>>> module load time, but have content and have image-file pointers.
>>
>> http://osr507doc.sco.com/en/topics/COFF_SectHdrFlags.html disagrees.
>> STYP_NOLOAD     0x02    Noload section (allocated, relocated, not loaded)
>>
>> --
>> Alan Modra
>> Australia Development Lab, IBM
>>
>
> Well, the issue for pe-coff is that no-LOAD with ALLOC leads to
> uninitialized data, which is used for .bss. But sections with NOLOAD
> have content and therefore need INITIALIZED_DATA flag set.
> So it makes sense for ELF that a section, which is allocated but not
> loaded, to short-cut to write zero-data. But well, the no-load case
> should be covered by ELF-loader and not necessarily means that section
> must have zero'ed content, or am I wrong here?
> For pe-coff the no-load (caused by .bss, which has really no content
> stored), but isn't marked as STYP_NOLOAD AFAICS) the no-load should
> have still CONTENT.
>
> Kai
> --
> |  (\_/) This is Bunny. Copy and paste
> | (='.'=) Bunny into your signature to help
> | (")_(") him gain world domination
>

Dave,

have you test if the patch solves your issue?

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination



More information about the Binutils mailing list