Suppose we have a function definition, in either C or assembly. Is it possible to calculate the size of such a function (presumably in byes) at compile time? One potential solution would be to have the functions whose sizes we want to calculate in a separate file, compile it, and perform the computation based on ELF data, but are there maybe easier solutions?
Suppose we have a function definition, in either C or assembly. Is it possible to calculate the size of such a function (presumably in byes) at compile time? One potential solution would be to have the functions whose sizes we want to calculate in a separate file, compile it, and perform the computation based on ELF data, but are there maybe easier solutions?