4.8.2 Obtaining the Size of a Specific Section
The .sizeof.(section_name)
operator can be used to obtain the size of a specific section after the link process has occurred. For example, to find the final size of the .data
section, use:
mov #.sizeof.(.data), w0
Note: When the
.sizeof.(section_name)
operator is used on a section in program memory, the
size returned is the size in PC units. The 32-bit MCU
PIC32A device PC increments by 4 for each
instruction word.