This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: coff section flags: STYP_COPY, in particular, for TI COFF files
- From: Ian Lance Taylor <ian at airs dot com>
- To: John E Hein <jhein at timing dot com>
- Cc: binutils at sources dot redhat dot com
- Date: 04 Apr 2003 22:48:02 -0800
- Subject: Re: coff section flags: STYP_COPY, in particular, for TI COFF files
- References: <16014.10221.454221.906570@gromit.timing.com>
John E Hein <jhein at timing dot com> writes:
> Sections flagged by STYP_COPY are to be relocated and loaded, but not
> allocated. For instance, there's a .vers section that has section
> flags 0x50 (STYP_COPY | STYP_DATA). binutils marks these with
> SEC_LOAD & SEC_ALLOC (loaded & allocated).
How can something be loaded but not allocated?
In BFD lingo, loaded means that the section should be loaded into
memory when the program is run. Allocated means that a portion of
memory should be set aside for the section at link time. It's
possible to have a section which is allocated but not loaded: the .bss
section is one--there is no need to load it because the contents are
known to be zero. But if a section is loaded but not allocated, then
where are you supposed to load it?
Ian