Arm Community
Site
Search
User
Site
Search
User
Support forums
Arm Development Studio forum
how to override static function
Jump...
Cancel
Locked
Locked
Replies
4 replies
Subscribers
119 subscribers
Views
4223 views
Users
0 members are here
Options
Share
More actions
Cancel
Related
How was your experience today?
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion
how to override static function
hebo hebo
over 12 years ago
Note: This was originally posted on 5th June 2009 at
http://forums.arm.com
I find we can override a function Using $Super$$ and $Sub$$ to overide symbol definitions from the pdf ADS_LinkerGuide_A.pdf.But When I use this way to override a static function defined in a library, ads linker can't find the $Super$$func symbol, but I find when the function is global in a library, ads linker succeed.
How can I override the static function in a library!
extern void ExtraFunc(void);
extern void $Super$$foo(void):
/* this function will be linked instead of the original foo() */
void $Sub$$foo(void)
{
ExtraFunc(); /* does some extra setup work */
$Super$$foo(); /*
}
Parents
Peter Harris
over 12 years ago
Note: This was originally posted on 5th June 2009 at
http://forums.arm.com
You can't.
Static functions are local to the translation unit, so the symbol is resolved by the compiler - the linker never sees it.
Cancel
Vote up
0
Vote down
Cancel
Reply
Peter Harris
over 12 years ago
Note: This was originally posted on 5th June 2009 at
http://forums.arm.com
You can't.
Static functions are local to the translation unit, so the symbol is resolved by the compiler - the linker never sees it.
Cancel
Vote up
0
Vote down
Cancel
Children
No data