首页 > 其他 > 详细

MSP430之section(1)

时间:2015-05-13 18:36:34      阅读:268      评论:0      收藏:0      [点我收藏+]

1  Intro

  The smallest unit of an object file is a section. A section is a block of code or data that occupies contiguous space in the memory map.

    .text section contains executable code
    .data section usually contains initialized data
    .bss section usually reserves space for uninitialized variables

  There are two basic types of sections:
   - Initialized sections: contain data or code. The .text and .data sections are initialized; user-named sections created with the .sect and .intvec assembler directives are also initialized.

   - Uninitialized sections: reserve space in the memory map for uninitialized data. The .bss section is uninitialized; user-named sections created with the .usect assembler directive are also uninitialized.

   技术分享

2  Special sections

  A few common special sections are:
   • .text -- Used for program code.
   • .bss -- Used for uninitialized objects (global variables).
   • .data -- Used for initialized non-const objects (global variables).
   • .const -- Used for initialized const objects (string constants, variables declared const).
   • .cinit -- Used to initialize C global variables at startup.
   • .stack -- Used for the function call stack.
   • .sysmem - Used for the dynamic memory allocation pool.

 

MSP430之section(1)

原文:http://www.cnblogs.com/mengdie/p/4500880.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!