Objective: To understand the reason for the difference in binary sizes of same binary built in two identical environments
Background: We have created a new duplicate build environment in a different location. However when the binary size is compared between these two environments, more than 60% of binaries are not having the same size in both environments.
Actions Taken / Required: In order ro understand the reasons for the varying size, We tried using the tools like readelf, objdump, cmp, vbindiff, Beyond Compare etc. Using these tools We are able to get the differences highlighted, but not sure what is the meaning of it and how to take action to resolve the size issue.
For Example:
Binary 1 from environment 1 shows: Entry point address: 0x10cc8
Binary 1 from environment 2 shows: Entry point address: 0x10d10
Not sure what the above difference in these two binary meant.
Similarly
Binary 1 from environment 1 shows: Start of section headers: 215080 (bytes into file)
Binary 1 from environment 2 shows: Start of section headers: 215172 (bytes into file)
Similarly there are various instances of differences between these two binaries.
Can you suggest the ways to understand the differences highlighted in order to take action to understand the reasons for the binary file size differences.
PS: I have gone through the following post and was very helpful to follow some of the steps gcc compiled binaries w/different sizes?
Thanks in advance