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

[WebAssembly] Add segment RETAIN flag to support private retained data #81539

Merged

Commits on Feb 20, 2024

  1. [WebAssembly] Add segment RETAIN flag to support private retained data

    In WebAssembly, we have `WASM_SYMBOL_RETAIN` symbol flag to mark the
    referenced content as retained. However, the flag is not enough to
    express retained data that is not referenced by any symbol.
    This patch adds a new segment flag WASM_SEG_FLAG_RETAIN to support
    "private" linkage data that is retained by llvm.used.
    
    This kind of data that is not referenced but must be retained is usually
    used with encapsulation symbols (__start/__stop). Swift runtime uses
    this technique and depends on the fact "all metadata sections in live
    objects are retained", which was not guaranteed with `--gc-sections`
    before this patch.
    kateinoigakukun committed Feb 20, 2024
    Configuration menu
    Copy the full SHA
    3b37215 View commit details
    Browse the repository at this point in the history