3.5.15 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 6.3 Assembly List Files), or the map file (see 7.3 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 5.12.3.3 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.