LX51 User's Guide

Locating Segments

After the linker combines partial segments it locates the resulting segment at a physical address. Segments are processed in order according to memory class and the order of the object files specified on the command line. Memory is allocated in the following order:

  1. Register Banks and segments with absolute addresses.
  2. Segments specified in linker SEGMENTS directive.
  3. Segments with the BITADDRESSABLE relocation type and other BIT segments.
  4. All other segments with the DATA memory class.
  5. Segments with the IDATA, EDATA, and NCONST memory classes.
  6. Segments with the XDATA memory class.
  7. Segments with the CODE memory class and the INBLOCK relocation type.
  8. Other segments with the CODE and CONST memory classes.
  9. Segments with the ECODE, HCONST, and HDATA memory classes.