码迷,mamicode.com
首页 > 其他好文 > 详细

MSP430之section(1)

时间:2015-05-13 18:38:06      阅读:134      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!