Avatar of naseeam
naseeamFlag for United States of America

asked on 

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

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?
SoftwareCC++

Avatar of undefined
Last Comment
naseeam
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of naseeam
naseeam
Flag of United States of America image

ASKER

>> To avoid name conflicts
In embedded 'c' language source code, variable foo is defined.  In Executable and Linking Format(ELF) formatted .map file it's _foo or __foo.  What conflict is there?  Why not foo in .map file?

Avatar of naseeam
naseeam
Flag of United States of America image

ASKER

@Kent
I understand your answer.
Avatar of naseeam
naseeam
Flag of United States of America image

ASKER

Thank you!
C++
C++

C++ is an intermediate-level general-purpose programming language, not to be confused with C or C#. It was developed as a set of extensions to the C programming language to improve type-safety and add support for automatic resource management, object-orientation, generic programming, and exception handling, among other features.

58K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo