I have a problem with compiling C program for risc-v on for profiling purposes. I wanted to execute risc-v program on spike and get profiling results but during linking i’ve got an error :
" Undefined reference to _mcount" when I used -pg flag.
If anyone had similar issue I would like to now how he got fixed it. I’ve used riscv-tools from github-site to get all necessary files and folders for building risc-v on ubuntu.
If you need more info i can provide to you
Thanks in advance,
Sorry, this is the first time I’m writing a topic on forum so I am not sure if I’ve provided you with enough info.