map syntax >>-#--pragma--map--(--name1--,--"--name2--"--)-----------------><
map syntax >>-#--pragma--map-----------------------------------------------> >--(--name1--+----------------+--,--"--name2--"--)------------->< '-(--arg_list--)-'
Description
Converts all references to an identifier to another, externally defined identifier.
Parameters
name1 should be declared in the same compilation unit in which it is referenced, but should not be defined in any other compilation unit. name1 must not be used in another #pragma map directive anywhere in the program.
name2 can be declared or defined in the same compilation unit in which name1 is referenced. name2 must not be the same as that used in another #pragma map directive in the same compilation unit.
Notes on Usage
The #pragma map directive can appear anywhere in the program.
In order for a function to be actually mapped, the map target function (name2) must have a definition available at link time.
If name2 specifies a function name that uses C++ linkage, then name2 must be specified using its mangled name. For example,
int foo(int, int);
#pragma map(foo, "bar__FiT1")
int main( )
{
return foo(4,5);
}
int bar(int a, int b)
{
return a+b;
}