Reputation: 11
I'm currently working on a control-flow integrity framework on a custom-made RISC-V SoC. Mainly, I have some CSRs that I need to write at the beginning and the end of each function. I'm doing it now by inserting CSRW
instructions directly within the assembly .S file generated by GCC. It works great with most parts but not with the C functions coming from standard libraries.
The problem is that these functions are not visible within the .S file; I can only see a call
or a tail
calling them, but not their actual implementation. Is there a GCC flag that I can use while compiling that would make these functions visible?
Upvotes: 0
Views: 81