Tool/software: TI C/C++ Compiler
Added --symbol_map='actual_function_name=stub_function_name' in linker option on compiling the test having stub function.
Example:
bool stub_fun_foo()
{
flag = true;
return flag;
}
bool fun_foo()
{
flag = false;
return flag;
}
void test()
{
bool result = fun_foo();
}
So, the command for linker is written as: --symbol-map='fun_foo=stub_fun_foo'
There is no linker error found. Linker is able to read/recognize --symbol-map command. But the value passed to it ('fun_foo=stub_fun_foo') is not having any effect on the result expected.
When fun_foo() is called in void test() function. The expectation is stub_fun_foo() should be called and 'result' should have 'true' value. But fun_foo() is called and result is having 'false' value.
Is there any wrong in the value given to the --symbol-map command?
Please correct us.