How Do I Find Out Where Variables and Functions Have Been Positioned?

You can determine where variables and functions have been positioned from either the assembly list file (see Assembly List Files), or the map file (see Map Files). Only symbols associated with objects with static storage duration are shown in the map file; all symbols (including those with automatic storage duration) are listed in the assembly list file, but only for the code represented by that list file. Each assembly module has its own list file.

There is a mapping between C identifiers and the symbols used in assembly code, which are the symbols shown in both of these files (see Equivalent Assembly Symbols). 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.