different elf size on windows vs macos for project

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
agmi_3321141
Level 4
Level 4
5 likes given First like received First like given

Hello,

I built my project on the WICED SDK available for macos. My project produces slightly different binary size on macos. I also tried to build some examples in the SDK and noticed that its mostly libc that produces the difference. Can any experts comment on why this might be happening? The version of armgcc on Windows is :

PS C:\WICED-Studio-6.4-SDK> .\43xxx_Wi-Fi\tools\ARM_GNU\Win32\bin\arm-none-eabi-gcc.exe --version
arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.2.1 20170904 (release) [ARM/embedded-7-
branch revision 255204]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 

This is the output on macos:

./43xxx_Wi-Fi/tools/ARM_GNU/OSX/bin/arm-none-eabi-gcc --version

arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]

Copyright (C) 2017 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

0 Likes
2 Replies
Murali_R
Moderator
Moderator
Moderator
250 sign-ins 250 replies posted 100 solutions authored

Hello agmi_3321141

My initial guess would be the same too. There is around 20 bytes of difference between the windows and the OSX version of the libc.a file(at arm-none-eabi/lib/) and i think this may be one the reason for the difference between the file sizes built. I will dig into this more and will try to find a more concrete reason as to why this may be happening.

Can you let me know the difference that you are seeing when you build using the 2 systems?

Thanks

0 Likes

The libc size in the "flash" column printed on the build console is 49715 for libc under macOS and 49747 under windows, so that's a difference of 32. You can also observe a similar (not exact, less than 20) for an example such as the scan project.

0 Likes