0
点赞
收藏
分享

微信扫一扫

help about the key-word section in VDSP IDDE


Placement Support Keyword (section)

Placement Support Keyword (section)

The section() keyword directs the compiler to place an object or function in an assembly .SECTION of the compiler’s intermediate output file. You name the assembly .SECTION with the string literal parameter of the section() keyword. If you do not specify a section() keyword for an object or function declaration, the compiler uses a default section. The .ldf file supplied to the linker must also be updated to support the additional named section. For information on the default sections, see ​​"Using Memory Sections"​​ .

Applying section() is meaningful only when the data item is something that the compiler can place in the named section. Apply section() only to top-level, named objects that have static duration; for example, objects that are explicitly static , or are given as external-object definitions. The example below shows the declaration of a static variable that is placed in the section called bingo

   static section("bingo") int x;

The section() keyword has the limitation that section initialization qualifiers cannot be used within the section name string. The compiler may generate labels containing this string, which will result in assembly syntax errors. Additionally, the keyword is not compatible with any pragmas that precede the object or function. For finer control over section placement and compatibility with other pragmas, use #pragma section

Refer to ​​"#pragma section/#pragma default_section"​​ for more information.

Note: Note that section has replaced the segment keyword in earlier releases of the compiler. Although the segment()

 

举报

相关推荐

0 条评论