How Do I Position A Function Into An Address Range?

Having one or more functions located in a special area of memory might mean that you can ensure they are code protected, for example. To do this, you need to move the function into a unique section (psect), define a memory range, and then place the new section in that range.

Use the __section() specifier to have the function positioned into a new section. Use the -Wl driver option to define a memory range and to place the new section into that range. See Changing and Linking the Allocated Section for examples of all these operations.