What is 'N/A (alignment)' in the .map file?

Technical Note 35041

Targets:
All

Component:
Linker

Updated:
12/5/2007 11:24 AM

Introduction

What is 'N/A (alignment)' in the *.map file? It is space that is lost due to alignment restrictions on segments.

Placement command example:

-Z(DATA)A,B,C=0-FFFF

Assume:

  • A has a size of 0x1F bytes and an alignment of 0 (1-byte aligned)
  • B has a size of 0xA bytes and an alignment of 1 (2-byte aligned)
  • C has a size of 0x40 bytes and an alignment of 2 (4-byte aligned)

Result:

  • A will be placed on 0x0-0x1E
  • B will be placed on 0x20-0x29 (1 byte, 0x1F, will be lost due to alignment)
  • C will be placed on 0x2C-0x6B (2 bytes, 0x2A and 0x2B, will be lost due to alignment)

The module summary will list 3 bytes as N/A (alignment) in this case.

Note that allocation in the reverse order (C,B,A) will generated 0 byte alignment "spill". The N/A (alignment) entry allows you to quickly see if there are any bytes wasted on alignment problems.

All product names are trademarks or registered trademarks of their respective owners.

Related Tech Notes

© IAR Systems 1995-2016 - All rights reserved.