SPRU513Z August 2001 – October 2023 SM320F28335-EP
Symbol mapping allows a symbol reference to be resolved by a symbol with a different name, which allows functions to be overridden with alternate definitions. This can be used to patch in alternate implementations to provide patches (bug fixes) or alternate functionality. The syntax for the --symbol_map option is:
--symbol_map= refname=defname
For example, the following code makes the linker resolve any references to foo by the definition foo_patch:
--symbol_map=foo=foo_patch
The --symbol_map option is supported even if --opt_level=4 was used when compiling.
The string passed with the --symbol_map option should contain no spaces and not be surrounded by quotes. This allows the same linker option syntax to work on the command line, in a linker command file, and in an options file.