17.2.26 Space Function Attribute

The space(id) attribute places the function in the memory space identified by the id argument. The id argument may be prog, which places the function in the program space (i.e., ROM), or data, which places the function in a data section (i.e., RAM). Unlike the section attribute, the actual section is not explicitly specified, for example:
void __attribute__ ((space(prog))) foo(void);