DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
COFF link editor

DSECT, COPY, NOLOAD, INFO, and OVERLAY sections

Sections in a COFF file may be given a type in a section definition, as shown in the following example:

   SECTIONS
   {
           name1 0x200000 (DSECT)       : { file1.o }
           name2 0x400000 (COPY)        : { file2.o }
           name3 0x600000 (NOLOAD)      : { file3.o }
           name4          (INFO)        : { file4.o }
           name5 0x900000 (OVERLAY)     : { file5.o }
   }

The DSECT option creates a dummy section. A dummy section has the following properties:

In the above example, none of the sections from file1.o are allocated, but all symbols are relocated as though the sections were link edited at the specified address. Other sections could refer to any of the global symbols and they are resolved correctly.


A copy section created by the COPY option is similar to a dummy section. The difference between a COPY section and a dummy section is that the contents of a COPY section and all associated information is written to the output file.

An INFO section is similar to a COPY section: instead of containing valid text and data, as a COPY section does, its purpose is to carry information about the object file. INFO sections are usually used to contain file version identification information.

A section with type NOLOAD differs in only one respect from a normal output section: its text or data is not written to the output file. A NOLOAD section is allocated virtual space, appears in the memory map, and so on.

An OVERLAY section is relocated and written to the output file. It is different from a normal section in that it is not allocated and may overlay other sections or unconfigured memory.


Next topic: Output file blocking
Previous topic: Incremental link editing

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003