MAP file analysis - where's my code size comes from?

后端 未结 5 991
面向向阳花
面向向阳花 2020-12-30 08:45

I am looking for a tool to simplify analysing a linker map file for a large C++ project (VC6).

During maintenance, the binaries grow steadily and I want to figure o

5条回答
  •  余生分开走
    2020-12-30 09:27

    The map file should have the size of each section, you can write a quick tool to sort symbols by this size. There's also a command line tool that comes with MSVC (undname.exe) which you can use to demangle the symbols.

    Once you have the symbols sorted by size, you can generate this weekly or daily as you like and compare how the size of each symbol has changed over time.

    The map file alone from any single build may not tell much, but a historical report of compiled map files can tell you quite a bit.

提交回复
热议问题