The linker memory space may be partitioned into several segments. The compiler allows associating certain global variables or functions with a peculiar segment. Those variables/functions will then be allocated by the linker into that segment. Where the segment actually lies is determined by a placement entry in the linker parameter file.
There are three types of segments, code segments, data segments and constant data segments, each with a matching pragma:
Each such pragma is valid until the next pragma of the same type is encountered. If no pragma is specified, the compiler assumes the following default segments:
To explicitly set the current segment to the default segment, use segment name DEFAULT:
For more information, refer to the following topics: