Skip to content

Global dead code elimination on final firmware image #104

@rmn30

Description

@rmn30

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions