4.7.2.5 Section Attribute

The section("section") attribute allocates the function to a user-nominated section, rather than allowing the compiler to place it in a default section. If the CCI is enabled (see 3.6.3.4 Ext Option) a more portable specifier, __section(section), is available. See 4.14.2 Changing and Linking the Allocated Section for full information on the use of this specifier.

For example, the following CCI-compliant code places the code associated with the readInput function in a unique section called myText:

int __section("myText") readInput(int port)
{ ... }