Normally, the compiler produces RO, RW, and ZI sections from a single source file. These regions contain all the code and data from the source file. To place a single fuction or data item at a fixed address, you must enable the linker to process the function or data separately from the rest of the input files. To access an individual object, either:

  1. Place the function or data item in its own source file. “Note Specifying one object for each function or data block limits the ability of the compiler to perform optimizations.”
  2. Use the -zo compiler option to produce an object file for each function (see the ADS Compilers and Libraries Guide)
  3. Use #pragma arm section inside the C or C++ source code to create multiple named sections (see Example 5-5 on page 5-27).
  4. Use AREA directive from assembly language. For assembly code, the smallest locatable unit is an AREA (see the ADS Assembler Guide).

Reference from linkerguide page 5-25

 
arm-contest/arm-contest/placing_functions_and_data_at_a_specific_addresses.txt · Last modified: 2010/05/22 09:19 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki