Hello,
I've seen, on an article about Masm, a reference to a .MAP file, but this subject wasn't discuss in a deeper way. So my questions are very simple:
-What are .MAP files ?
-How could i produce it?
-How could i use it ? (or What is exactly the use of .MAP files)
Thnak you very much.
Regards, Neitsa.
I've seen, on an article about Masm, a reference to a .MAP file, but this subject wasn't discuss in a deeper way. So my questions are very simple:
-What are .MAP files ?
-How could i produce it?
-How could i use it ? (or What is exactly the use of .MAP files)
Thnak you very much.
Regards, Neitsa.
here is a MAP file generated for HE game with tasm32/tlink32
As you can see it is a list of all used segments and their attributes.
The list is generated by the linker IMHO. It is somehow more usefull when you are targeting absolute addressing / code locations like in an custom OS for example
Here it just states that the code and data segments have the same base (ie ZERO) and the BSS segment (uninitialized data) starts right after the DATA segment
Start Length Name Class
0001:00000000 000071894H _TEXT CODE
0002:00000000 00013E2C0H _DATA DATA
0002:0013E2C0 002506BD0H _BSS BSS
As you can see it is a list of all used segments and their attributes.
The list is generated by the linker IMHO. It is somehow more usefull when you are targeting absolute addressing / code locations like in an custom OS for example
Here it just states that the code and data segments have the same base (ie ZERO) and the BSS segment (uninitialized data) starts right after the DATA segment
MAP files usually have a full list of symbols (at least public ones) in your linked executables, along with their virtual address... if not, a map file isn't much use :). It can be used to check alignment, data grouping, ... - and just because it's interesting to look at for larger projects.
--- CUT ---
I've never used the option, but there is /MAP:filename option for the MS linker.
I do cross-development for various microcontrollers, and their linkers also produce .MAP files. The files provide similar information, but there is no standard format - it is simply a report form (in text) of where everything is located after the final link.
I do cross-development for various microcontrollers, and their linkers also produce .MAP files. The files provide similar information, but there is no standard format - it is simply a report form (in text) of where everything is located after the final link.