近年はあまり使用しなくなりましたが、レガシーな環境ではリンカー(link.exe)が作成する.MAPファイルにお世話になることがあるかと思います。
ファイルを見れば意味はなんとなくわかりますが、ググラビリティが低いので自分用にメモします。
現在は、ビルド時間の観点からMAPファイルの出力は非推奨のようです。
Build Time Improvement Recommendation: Turn off /MAP, use PDBs
https://devblogs.microsoft.com/cppblog/build-time-improvement-recommendation-turn-off-map-use-pdbs/
Map files are an old technology: with modern releases of the MSVC toolset, PDB (Program Database) files do everything map files do and more.
Producing a map file takes a long time.
リンク
- Finding Crash Information Using the MAP File
https://www.codeproject.com/Articles/3472/Finding-Crash-Information-Using-the-MAP-File - Using MAP files - part 1
https://docs.microsoft.com/en-us/archive/blogs/hopperx/using-map-files-part-1
https://web.archive.org/web/20140429011603/http://blogs.msdn.com/b/hopperx/archive/2006/09/14/754772.aspx - Map File Breakpoints
https://docs.microsoft.com/en-us/archive/blogs/hopperx/map-file-breakpoints
https://web.archive.org/web/20140510080247/http://blogs.msdn.com/b/hopperx/archive/2007/02/14/map-file-breakpoints.aspx - Resolving Symbols Manually on Windows CE (ADDRESS --> SYMBOL)
https://docs.microsoft.com/en-us/archive/blogs/sloh/resolving-symbols-manually-on-windows-ce-address-symbol
https://web.archive.org/web/20140429010903/http://blogs.msdn.com/b/sloh/archive/2005/02/28/381706.aspx
シンボルについているfとかi
MAPファイルに、Rva+BaseとLib:Objectの間に、こんな感じでフラグっぽいものが存在します。
Address Publics by Value Rva+Base Lib:Object
...
0002:00001e90 ??$WriteResultString@PBD@details@wil@@YAPAEPAE0PBDPAPBD@Z 00412e90 f i Main.obj
Stackoverflowによると、fはFunction、iはinlineのようです。
Unknown flag in .MAP file format
https://stackoverflow.com/questions/24102976/unknown-flag-in-map-file-format
the "f" means "function".
I can reverse-engineer "i" to "inline", a function in the COMDAT section.