This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: coff section flags: STYP_COPY, in particular, for TI COFF files


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]