Example 5. The SECTIONS Directive

/**************************************************/ /* Sample command file with SECTIONS directive */ /**************************************************/ file1.c.obj file2.c.obj /* Input files */ --output_file=prog.out /* Options */ SECTIONS { .text: load = EXT_MEM, run = 0x00000800 .const: load = FAST_MEM .bss: load = SLOW_MEM .vectors: load = 0x00000000 { t1.c.obj(.intvec1) t2.c.obj(.intvec2) endvec = .; } .data:alpha: align = 16 .data:beta: align = 16 }

Figure 12-2 shows the output sections defined by the SECTIONS directive in Example 5 (.vectors, .text, .const, .bss, .data:alpha, and .data:beta) and shows how these sections are allocated in memory using the MEMORY directive given in Example 3.

Figure 12-2 Section Placement Defined by Example 5TMS320C7000 secallocate_tdz075.gif