When all libraries and application is compiled in instrumentation mode, some extra ELF sections are created by the compiler. In any examples, these additional section handling needs to be done in linker script.
In the linker file, some change are required. Add following lines of code in linker file when using ti-arm-clang compiler. This code should be inside SECTIONS
.
Few things to keep tack of:
.bss
, __llvm_prf_cnts
and __llvm_prf_bits
should not be present anywhere else in the linker file.OCRAM
should be replaced with correct memory name.