Information about the generated amount of bytes is collected and shown. Still some parts of this information can be hard to decipher. This tech note focuses on 'bytes shared'. (Products using IAR ILINK Linkerâ„¢ are not covered by this Tech Note.)
Information about the generated amount of bytes for functions and data for each memory is directed to stdout and displayed on the screen. Some of the bytes might be reported as shared. Example and more information below.
---calendar.lst-------------------------------------------------------------
5 646 bytes of CODE memory (+ 304 bytes shared)
656 bytes of CONST memory
288 bytes of DATA memory
Errors: none
Warnings: none
---calendar.s**-------------------------------------------------------------
PUBWEAK `?*?DATA_ID`
MULTWEAK ??BKP_DeInit??rT
MULTWEAK ??BKP_ReadBackupRegister??rT
MULTWEAK ??BKP_WriteBackupRegister??rT
---STM32F10x_Demo.map-------------------------------------------------------
DATA_ID
Segment part 87. NOT NEEDED.
ENTRY ADDRESS REF BY
===== ======= ======
?*?DATA_ID
----------------------------------------------------------------------------
Above example has 304 bytes shared as shown in the *.lst file and stdout. Looking in the assembler file *.s** entries with PUBWEAK and MULTWEAK are the ones marked with shared. Finally the entries are also seen in the *.map file as NOT NEEDED.
Shared objects are functions or data objects that are shared between modules. If any of these occur in more than one module, only one copy will be retained. For example, in some cases inline functions are not inlined, which means that they are marked as shared, because only one instance of each function will be included in the final application. This mechanism is sometimes also used for compiler-generated code or data not directly associated with a particular function or variable, and when only one instance is required in the final application.
All product names are trademarks or registered trademarks of their respective owners.
© IAR Systems 1995-2021 - All rights reserved.
We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies