Skip to content
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

Global dead code elimination on final firmware image #104

Open
rmn30 opened this issue Jan 14, 2025 · 0 comments
Open

Global dead code elimination on final firmware image #104

rmn30 opened this issue Jan 14, 2025 · 0 comments

Comments

@rmn30
Copy link

rmn30 commented Jan 14, 2025

At the moment we have dead code elimination within a compartment via -ffunction-sections -fdata-sections and -gc-sections but all exported functions are used as roots for GC purposes even if they're never used in the final firmware image. This applies to both compartments and libraries, which is really bad for the final image size. To solve this properly we could use a global pass at the point of firmware linking, but this will probably require extensive changes to the linkage model. Doing it just for library compartments may be easier or we could support explicitly enable and disabling specific entry points when building compartments, although this may be a bit painful to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant