coff section flags: STYP_COPY, in particular, for TI COFF files
Ian Lance Taylor
ian@airs.com
Sat Apr 5 06:48:00 GMT 2003
John E Hein <jhein@timing.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
More information about the Binutils
mailing list