commit | b8dce8331398dca5ea5badd03b27dcef6bb9e791 | [log] [tgz] |
---|---|---|
author | Yuta Saito <kateinoigakukun@gmail.com> | Wed Feb 21 03:35:36 2024 +0900 |
committer | Copybara-Service <copybara-worker@google.com> | Tue Feb 20 10:41:58 2024 -0800 |
tree | 37fdc8da042bdb90d34e9b3b9f553fea5f2b14a7 | |
parent | 68281cd416055538afe4d39e222e939fe03536cf [diff] |
[WebAssembly] Add segment RETAIN flag to support private retained data (#81539) In WebAssembly, we have `WASM_SYMBOL_NO_STRIP` 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. This is a revised version of https://reviews.llvm.org/D126950 (has been reverted) based on @MaskRay's comments GitOrigin-RevId: ba3c1f9ce30cf4f8aee5f1961df74d65e11d53bc
This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.
lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.
In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.
It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz
The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f
.