This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/CCSTUDIO: The address of GLOBAL SYMBOLS in map file

Part Number: CCSTUDIO

Tool/software: TI C/C++ Compiler

In the end of map file, there is a list of global symbols, list the address and name. some address is the real address of the symbol, but some is not address obviously, for example below the _STACK_SIZE is a const value set in cmd file.


GLOBAL SYMBOLS: SORTED BY Symbol Address

address name
------- ----
00001000 __STACK_SIZE
00001000 __SYSMEM_SIZE

in cmd file: 

-stack 0x000001000 /* Stack Size */
-heap 0x000001000 /* Heap Size */

and also below value of symbol also should not be address:

ffff0000 INT_VECS
ffffffff ___binit__
ffffffff ___c_args__
ffffffff ___pinit__
ffffffff binit
ffffffff pinit

For BIOS based project, there will be more similar symbol as below picture. with same "address". Is this a real address, or just a const value? is there a explanation to the map file format?

  • You are correct that while all of these symbols are treated by the linker as addresses, some actually represent integer values. The linker does not "know" the difference between symbols that are actually integer values differently than those that are addresses, so there is no difference in the map file. For any given symbol, you need to know what the defining source code intends it to represent, and that means you'll need to know what BIOS intends that symbol to represent.