SPRUIG8J January 2018 – March 2024
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 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.