-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculating size of function #54
Comments
@vext01 might have some ELF-ish thoughts about this? |
A typical method (e.g. used by
It might not be feasible to read that from source — I've never tried — but for assembly functions you can define a global symbol (instead of the local |
An approach of doing this was implemented in #55. Do we still want to keep this issue for potential future improvements to the current implementation? |
In principle we could do better — making it a static constant with a relocation — but whether or not that is achievable is unclear. It's probably a low priority concern, anyway. |
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?
The text was updated successfully, but these errors were encountered: