Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Why does .map file have _variable names and not just variable names?

Status
Not open for further replies.

jani12

Advanced Member level 4
Full Member level 1
Joined
Oct 30, 2014
Messages
108
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,298
Activity points
2,536
In embedded software, why does the .map file have _variable names and not just variable names? A particular variable name in code doesn't start with underscore. Then, why does this variable start with an underscore in .map file?
 

Variable names that start with an underscore are valid variable names. But user variables do not, by convention, begin with an underscore. Variable names that begin with a single underscore are produced by the compiler (I am not sure who looks at them). There are system variables that begin with two underscores. For the user, it has no significance.
 
  • Like
Reactions: jani12

    jani12

    Points: 2
    Helpful Answer Positive Rating
I think the compiler adds an underscore to all user-specified symbols to make sure that they never can clash with "internal" symbols used by the compiler.
The compiler can safely use any symbol that doesn't begin with an underscore.
 
  • Like
Reactions: jani12

    jani12

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top