.map 파일에서 'N/A(alignment)'란 무엇입니까?

기술노트 35041

아키텍처:

All

컴포넌트:

linker

업데이트:

2018-02-28 오전 2:51

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.

죄송하지만, 당사 사이트에서는 Internet Explorer를 지원하지 않습니다.보다 편안한 사이트를 위해 Chrome, Edge, Firefox 등과 같은 최신 브라우저를 사용해 주시길 부탁드립니다.