scripts: size_report: Optimize ELF headers reading

Read ELF headers only once for the size_report scirpt called
for 'all' memory areas, consequently it executes 30-50% faster.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
1 file changed