SPRUIG8J January 2018 – March 2024
In most cases, you can access linker-defined functions in the same way as C/C++ functions. Provide an extern declaration (prototype) for that function, and access the function normally:
extern int linker_defined_function(void);
printf(“value is %d\n”, linker_defined_function());
In most cases, you can access linker-defined arrays in the same way as C/C++ arrays. Provide an extern declaration for the array (which can omit the first dimension), and access the array normally:
extern int linker_defined_data[][10][10];
printf(“value is %d\n”, linker_defined_data[2][3][4]);
If you receive a relocation error because the function or array is outside the normal address range, use the _symval operator as described in Section 12.6.4.