Hello,
We have our own custom design based on imx8mp, and so far we have worked with various yocto versions from NXP. We also need to generate the toolchain using the populate_sdk command as we have some customers who need to cross compile their applications outside of yocto.
We have used the following versions
5.4.70-2.3.2 (gcc 9.2)
5.15.32-2.0.0 (gcc 11.2)
6.1.22_2.0.0 (gcc 12.2)
6.6.23-2.0.0 (gcc 13.2)
We see that the same source code compiled with gcc 12.2 and 13.2 (same compile and strip options) produces binary files that are considerably larger than before.
Do you know if there is anything new we need to consider with these new compiler versions to avoid this problem?
Kind regards and thanks
Hello Chavira,
Thank you for your help.
Best regards
Hi @AngelF!
Thank you for contacting NXP Support!
Are you trying to compile using Optimization flags?
Hi Chavira,
We are using same options than with other compiler versions
Hi @AngelF!
After talking with the internal team we conclude the next:
Enabling the shadow call stack feature in GCC 12 (when used with the AArch64 architecture) can increase the final binary size. This happens because additional instructions are needed to handle and verify return addresses, which takes up more space in the binary. Additionally, extra memory is required to store the shadow stack itself, contributing further to the increase in size. However, the impact on binary size will depend on factors such as the number of functions in the program and the complexity of the code.
Best Regards!
Chavira