Usually there is a linker switch to get total code and data size. I am unable to find it in the case of Blackfin linker.
I could calculate this from map file, in example by a python script. Is this kind of script done already done?
MAP file is the easiest way to get the size information.
The ELFDUMP command-line utility may prove useful. You can confirm the "real" size of your DXE application using the ELFDUMP command-line utility: ELDUMP filename.dxe
This will report the sizes of the various sections in your program. These sizes should match those reported in the MAP file.
Retrieving data ...