You can use section attributes to solve this. Suppose you add the following attribute when declaring functions in that file (or any other file):
void foo() __attribute__ ((section(".specialmem")));
And a similar section definition in your linker script:
.specialmem:
{
*(.specialmem)
}
You can do the same thing with data/bss (global variables) as well. Assuming you want some files/functions to end up in a specific memory location, it is a good practice to define these memory blocks in your linker file as well and then place them there like:
.specialmem:
{
*(.specialmem)
} >specialMemBlock