Determining which object files caused an increase in .dll size [C ++]

I am working on a large C ++ library that has recently grown by a significant amount. Because of this, the size is not obvious, which led to an increase in this size.

Do you have tool suggestions (msvc or gcc) that can help determine where the growth came from.

change Things I tried: Dumpbin - last dll, obj files, creating a map file and copying through it.

change again So objdump along with the python script seems to have done what I want.

+5
source share
4 answers

If gcc, objdump . If a visual studio, dumpbin .

() , () .

+6

Linux , diff. , , . Linux, . , .

+1

G'day,

-, , , ?

:

  • * nix Windows?
  • ?
  • ?
  • -g? ( 1)
  • ? ( 2)
  • ? ( 3)

: SCM, , . :

  • , du -sk , , .
  • , - find ./tree_top ( -name *.h -o -name *.cpp ) | wc -l
  • , find ./tree_top ( -name *.h -o -name *.cpp ) -print | sort > treelist, . sdiff .
  • , .
  • Makefile env. , , .

BTW Please post your findings here, as I am sure many are interested in what you learn.

amuses

0
source
Answer to

keysersoze (compare output objdumpor dumpbin) is correct. Another approach is to tell the linker about creating a map file and compare map files for old and new versions of the DLL.

  • MSVC: link.exe /MAP
  • GCC and binutils: ld -M(or gcc -Wl,-M)
0
source

All Articles