Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Count Trampolines

From Texas Instruments Wiki
Jump to: navigation, search

To count the number of trampolines that occur in your code, run the following command from a Windows DOS prompt ...

C:\> type file.map | perl -0777 -ne "s/^.*FAR CALL TRAMPOLINES\s*//s; s/\n\s*\n.*$//s; foreach (split/\n/) { ++$cnt if (m/[0-9a-f]{8}/); } print $cnt;"

Or this command from a Unix prompt ...

% cat file.map | perl -0777 -ne 's/^.*FAR CALL TRAMPOLINES\s*//s; s/\n\s*\n.*$//s; foreach (split/\n/) { ++$cnt if (m/[0-9a-f]{8}/); } print $cnt;'

Replace file.map with the name of your linker map file. A linker map file is created with the linker option -m file.

If there are no trampolines in your code, these commands produce no output.