13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Linker Script Language (LSL)group (priority=2){select "importantcode1";select "importantcode2";}16.8.3. Creating or Modifying Special SectionsInstead of selecting sections, you can also create a reserved section or an output section or modify specialsections like a stack or a heap. Because you cannot define these sections in the input files, you must usethe linker to create them.Stack• The keyword stack tells the linker to reserve memory <strong>for</strong> the stack. The name <strong>for</strong> the stack sectionrefers to the stack as defined in the architecture definition. If no name was specified in the architecturedefinition, the default name is stack.With the keyword size you can specify the size <strong>for</strong> the stack. If the size is not specified, the linker usesthe size given by the min_size argument as defined <strong>for</strong> the stack in the architecture definition. Normallythe linker automatically tries to maximize the size, unless you specified the keyword fixed.group ( ... ){stack "mystack" ( size = 2k );}The linker creates two labels to mark the begin and end of the stack, _lc_ub_stack_name <strong>for</strong> thebegin of the stack and _lc_ue_stack_name <strong>for</strong> the end of the stack. The linker allocates space <strong>for</strong>the stack when there is a reference to either of the labels.See also the stack keyword in Section 16.4.3, Defining Address Spaces.Heap• The keyword heap tells the linker to reserve a dynamic memory range <strong>for</strong> the malloc() function.Each heap section has a name. With the keyword size you can change the size <strong>for</strong> the heap. If thesize is not specified, the linker uses the size given by the min_size argument as defined <strong>for</strong> the heapin the architecture definition. Normally the linker automatically tries to maximize the size, unless youspecified the keyword fixed.group ( ... ){heap "myheap" ( size = 2k );}The linker creates two labels to mark the begin and end of the heap, _lc_ub_heap_name <strong>for</strong> the beginof the heap and _lc_ue_heap_name <strong>for</strong> the end of the heap. The linker allocates space <strong>for</strong> the heapwhen a reference to either of the section labels exists in one of the input object files.841

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!