0

Is there a tool gcc or binutils that can show me the big consumers of .bss? I have tried to sum up sizes from objdump -t bin-file | grep bss but it does not add up to the same as when I do size bin-file.

I am trying to find out where the ram is going in an embedded project that is using some external libraries.

[EDIT] It turned out to be the heap section defined in the link script that ate the "extra" bss that I did not see.

evading
  • 3,032
  • 6
  • 37
  • 57
  • 2
    Do you generate a .map file ? Because that's where I would look for the symbols present in .bss. However I don't know if the libraries' symbols will be there. – Tim Aug 17 '16 at 14:44
  • Yes, but I did not know what to use it for. It looks like what I am looking for. – evading Aug 17 '16 at 15:05

1 Answers1

1

Print BSS consumption of every object file:

size --common -t *.o