4.5.14 How Do I Learn Where Variables and Functions Have Been Positioned?
The xc-dsc-objdump
utility displays information about one or more object
files. Use the -t
option to print the symbol table entries of a file.
Also, you can determine where variables and functions have been positioned from the map file generated by the linker. Only externally visible symbols are shown in the map file.
There is a mapping between C identifiers and the symbols used in assembly
code. The symbol associated with a variable is assigned the address of the lowest byte of
the variable; for functions it is the address of the first instruction generated for that
function. For more on xc-dsc-objdump
and linker map files, refer to the following document. It
is available for download from the Microchip Technology website, www.microchip.com.
“MPLAB® XC-DSC Assembler, Linker and Utilities User’s Guide” (DS-50003590)