I'm trying to create a detailed report of the code, const, and RAM usage of an app and I'm seeing a mismatch in the code size of a module and the size of the sum of the functions in the same module. For example, in my map file I have the following:
*** MODULE SUMMARY
...
Module ro code ro data rw data
------ ------- ------- -------
...
driverlib.a: [5]
...
gpio.o 572
...
*** ENTRY LIST
...
Entry Address Size Type Object
----- ------- ---- ---- ------
...
GPIODirModeSet 0x0000c08d 0x28 Code Gb gpio.o [5]
GPIOPadConfigSet 0x0000c0b5 0xfe Code Gb gpio.o [5]
GPIOPinConfigure 0x0000c1fb 0x38 Code Gb gpio.o [5]
GPIOPinRead 0x0000c1b3 0x6 Code Gb gpio.o [5]
GPIOPinTypeGPIOOutput 0x0000c1c3 0xa Code Gb gpio.o [5]
GPIOPinTypeUART 0x0000c1e7 0x14 Code Gb gpio.o [5]
GPIOPinWrite 0x0000c1b9 0x6 Code Gb gpio.o [5]
g_pui32GPIOBaseAddrs 0x0000c238 0x90 Data Lc gpio.o [5]
1. In the module summary the code size of gpio.o is reported as 572 bytes, but if you add up the sum of the code segments, it comes out to be 392 bytes. Where is the remaining 180 bytes going in the gpio.o module? I see the same issue in several other modules too.
2. In the MODULE SUMMARY section the data size of gpio.o is 0 bytes, but in the ENTRY LIST section there is the data segment named g_pui32GPIOBaseAddrs, which section is correct?
In addition, I see several functions where the sizes aren't shown at all, for example:
__aeabi_d2iz 0x000054dd Code Gb DblToI32.o [6]
__iar_d2uiz 0x00005509 Code Gb DblToI32.o [6]
3. Why aren't the sizes of the functions shown?
4. Also, what do the "Gb" and "Lc" strings represent? Is it possible to deduce any information from them?
I'm using IAR for ARM v7.20.2.7424. My target is a TM4C123G.
Thanks,
Samuel