|
|||||||||||
|
Technical Support On-Line Manuals Linker User Guide |
Linker User GuideUsing $Super$$ and $Sub$$ to patch symbol definitions
There are situations where an existing symbol cannot be modified
because, for example, it is located in an external library or in
ROM code. In such cases you can use the To patch the definition of the function
NoteThe The following example shows how to insert a call to the function Example 9. Using $Super$$ and $Sub$$ extern void ExtraFunc(void); extern void $Super$$foo(void): /* this function is called instead of the original foo() */ void $Sub$$foo(void) { ExtraFunc(); /* does some extra setup work */ $Super$$foo(); /* calls the original foo() function */
/* To avoid calling the original foo() function
* omit the $Super$$foo(); function call.
*/
}
| ||||||||||
|
|||||||||||