I want to know the length of C function (written by me) at runtime. Any method to get it? It seems sizeof doesn\'t work here.
I have just came up with a solution for the exact same problem but the code i have written is platform depended.
The idea behind, putting known opcodes at the end of the function and searching for them from start while counting bytes we have skipped. Here is the medium link which i have explained with some code https://medium.com/@gurhanpolat/calculate-c-function-size-x64-x86-c1f49921aa1a