What Is the Purpose of a Map File? 
Author Message
 What Is the Purpose of a Map File?

Hi,

As I understand it, a map file is a listing of symbols and their memory
locations.
What is the purpose of a map file?  What can we do with the information
there in?

Thanks,

Tuan Vu



Tue, 23 Nov 2004 13:16:30 GMT  
 What Is the Purpose of a Map File?
There are a few things a map file tells you that may help you: what
libraries were the source of object code in your program, the addresses
of the program (which, outside of a fixed-memory space application like
an OS or an embedded system, won't help you much).

They also tell you how much of various kinds of segments/sections you're
using (i.e. .text is X Kbytes, .data is Y Kbytes, etc.).

HTH

Quote:

> Hi,

> As I understand it, a map file is a listing of symbols and their memory
> locations.
> What is the purpose of a map file?  What can we do with the information
> there in?

> Thanks,

> Tuan Vu



Tue, 23 Nov 2004 20:48:57 GMT  
 What Is the Purpose of a Map File?

Quote:
>They also tell you how much of various kinds of segments/sections you're
>using (i.e. .text is X Kbytes, .data is Y Kbytes, etc.).

This information can usually be extracted directly from the executable
file, by tools like the Unix "size" or its Microsoft counterpart whose
name I have long forgotten.

Dan
--
Dan Pop
DESY Zeuthen, RZ group



Tue, 23 Nov 2004 23:35:24 GMT  
 What Is the Purpose of a Map File?

Quote:
>As I understand it, a map file is a listing of symbols and their memory
>locations.
>What is the purpose of a map file?  What can we do with the information
>there in?

These days, if you're working with a hosted implementation that has a
decent symbolic de{*filter*}, a linker map file is quite useless.  A symbolic
de{*filter*} can access that information directly and make it irrelevant to
you (if you can ask the de{*filter*} to display the value of the variable
foo, you don't need to know what is the relative or absolute address of
the variable foo).

Once upon a time there were no symbolic de{*filter*}s and you had to use a
very primitive hex or octal de{*filter*} (or no de{*filter*} at all) to find what
was wrong with your program.  Knowing the address of each function and
of each variable was of a great help.

Nowadays, people using freestanding implementations can still find this
information helpful, in certain situations, especially if they have no
proper debugging tools for the target system.

Dan
--
Dan Pop
DESY Zeuthen, RZ group



Tue, 23 Nov 2004 23:31:27 GMT  
 What Is the Purpose of a Map File?
Yup, for sure, but it doesn't make my statement irrelevant.
Quote:


>>They also tell you how much of various kinds of segments/sections you're
>>using (i.e. .text is X Kbytes, .data is Y Kbytes, etc.).

> This information can usually be extracted directly from the executable
> file, by tools like the Unix "size" or its Microsoft counterpart whose
> name I have long forgotten.

> Dan
> --
> Dan Pop
> DESY Zeuthen, RZ group




Wed, 24 Nov 2004 03:28:05 GMT  
 What Is the Purpose of a Map File?

Quote:

> Yup, for sure, but it doesn't make my statement irrelevant.

Would you *please* stop top-posting? It doesn't help you gain any
sympathy here - and if you're about to do battle with Dan Pop, you're
going to need all the sympathy you can lay your hands on.

Quote:



> >>They also tell you how much of various kinds of segments/sections you're
> >>using (i.e. .text is X Kbytes, .data is Y Kbytes, etc.).

> > This information can usually be extracted directly from the executable
> > file, by tools like the Unix "size" or its Microsoft counterpart whose
> > name I have long forgotten.

--

"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton


Wed, 24 Nov 2004 14:05:43 GMT  
 What Is the Purpose of a Map File?

Quote:


> > Yup, for sure, but it doesn't make my statement irrelevant.

> Would you *please* stop top-posting? It doesn't help you gain any
> sympathy here - and if you're about to do battle with Dan Pop,
> you're going to need all the sympathy you can lay your hands on.

Existance theorem (and one example will be adequate proof).  (Left
facing capital E) a genuine posting by Dan Pop in which he admits
himself to be in error?

Note that the conditions do NOT require Dan to have actually been
in error, so we can't use reductio ad absurbum proofs here :-)
That is another independant theorem.

--

   Available for consulting/temporary embedded and systems.
   <http://cbfalconer.home.att.net>  USE worldnet address!



Wed, 24 Nov 2004 20:31:17 GMT  
 What Is the Purpose of a Map File?

Quote:

<snip>

> Existance theorem (and one example will be adequate proof).  (Left
> facing capital E) a genuine posting by Dan Pop in which he admits
> himself to be in error?

Does it have to be a pro-active admission? I once caught a dodgy strncpy
implementation of his, which he fessed up to after being found out
(IIRC).

<snip>

--

"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton



Thu, 25 Nov 2004 00:39:03 GMT  
 What Is the Purpose of a Map File?

Quote:

><snip>

>> Existance theorem (and one example will be adequate proof).  (Left
>> facing capital E) a genuine posting by Dan Pop in which he admits
>> himself to be in error?

>Does it have to be a pro-active admission? I once caught a dodgy strncpy
>implementation of his, which he fessed up to after being found out
>(IIRC).

To put an end to this silliness: I can be wrong, I was wrong in the past
and I have no doubt that I will be wrong in the future.

I have no problems admitting to be wrong, as soon as I am convinced that
I was wrong.  On the strncpy issue mentioned by Richard I was wrong
twice.  I have admitted being wrong as soon as my bug has been pointed
out.

Dan
--
Dan Pop
DESY Zeuthen, RZ group



Fri, 26 Nov 2004 19:32:24 GMT  
 What Is the Purpose of a Map File?

Quote:



> ><snip>

> >> Existance theorem (and one example will be adequate proof).  (Left
> >> facing capital E) a genuine posting by Dan Pop in which he admits
> >> himself to be in error?

> >Does it have to be a pro-active admission? I once caught a dodgy strncpy
> >implementation of his, which he fessed up to after being found out
> >(IIRC).

> To put an end to this silliness:

Fat chance of that. :-)

Quote:
> I can be wrong, I was wrong in the past
> and I have no doubt that I will be wrong in the future.

I don't think anyone else doubts that either. Having said that, you tend
to be a lot less wrong than most people (which might be why we take such
an unholy delight in trying to find errors in what you write).

Quote:

> I have no problems admitting to be wrong, as soon as I am convinced that
> I was wrong.  On the strncpy issue mentioned by Richard I was wrong
> twice.

Oh, yes - I'd forgotten. It was indeed twice. :-)

Quote:
> I have admitted being wrong as soon as my bug has been pointed
> out.

I hope we *all* do this (although I'd add that some of us take a little
convincing that our bugs are in fact bugs, which is why we have such
delightfully energetic discussions on occasion).

--

"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc: http://users.powernet.co.uk/eton



Fri, 26 Nov 2004 21:45:06 GMT  
 What Is the Purpose of a Map File?

----------

Quote:

> To put an end to this silliness

Fat chance.

Quote:
> I have no doubt that I will be wrong in the future.

Yes, but suppose it turns out to be the case that you are never again wrong
about anything. Will that mean that you are wrong in the present, or do the
words "I have no doubt" mean that you are making a correct statement about
an erroneous belief? I'm confused. What does the standard say about this?
Chapter and verse, please.


Sun, 28 Nov 2004 15:23:25 GMT  
 What Is the Purpose of a Map File?

Quote:

>> I have no doubt that I will be wrong in the future.

>Yes, but suppose it turns out to be the case that you are never again wrong
>about anything. Will that mean that you are wrong in the present,

No, because the statement wasn't an unqualified: "I will be wrong in the
future".

I am convinced that I will be wrong in the future, therefore my statement
is correct, even if I will never be wrong in the future.

Quote:
>or do the
>words "I have no doubt" mean that you are making a correct statement about
>an erroneous belief?

This is the case, indeed.  More precisely: a correct statement about a
potentially erroneous belief.

Quote:
>I'm confused.

It's all your fault: my statement was crystal clear :-)

Quote:
>What does the standard say about this?
>Chapter and verse, please.

This issue is beyond the scope of the standard, therefore your request is
pointless ;-)

Dan
--
Dan Pop
DESY Zeuthen, RZ group



Sun, 28 Nov 2004 23:49:36 GMT  
 
 [ 12 post ] 

 Relevant Pages 

1. Memory-mapped files - pros and cons of mapping view on whole file

2. What is the purpose of DAO253x.tlb files?

3. general purpose file-compression lib/dll

4. memory mapped files for index-files

5. Memory Mapped files: Volume for a file externally altered

6. memory mapped files for index-files

7. I am new to programming and am lost

8. C# , i am trying to create a file on the server using C#

9. i am unable to read from a file having 26ascii character(ctrl+z)

10. a very simple problem about # include files but i am a beginer

11. I am having problems with MFC42.dll file

12. Customizing Open File Dialog -- am I right?

 

 
Powered by phpBB® Forum Software