mirror of
https://github.com/siemens-mobile-hacks/llvm-c166.git
synced 2026-11-26 06:28:13 +00:00
This patch adds end-to-end support for common symbols (`.comm` /
`-fcommon`)
for the WebAssembly target in LLVM and LLD.
1. Object File and binary format:
- Introduce the `WASM_SYMBOL_BINDING_COMMON` (0x40) symbol flag in
`Wasm.h`.
- Update `WasmObjectWriter` and `WasmObjectFile` to serialize and parse
common
symbol metadata (size and alignment) in the linking symbol table.
- Update YAML tooling and `llvm-readobj` to handle common symbols.
2. LLD Support:
- Introduce `CommonSymbol` representing common data symbols.
- Implement common symbol resolution in `SymbolTable::addCommon`:
- Multiple common symbols are merged by selecting the maximum size and
alignment.
- Strong defined symbols override common symbols.
- Common symbols override weak symbols and undefined references.
- For non-relocatable links, allocate common symbols into a synthetic
`.bss.common` segment.
- For relocatable links (`-r`), preserve merged common symbols as
`WASM_SYMBOL_BINDING_COMMON`
in the output linking symbol table with their updated size and
alignment.
The format is documented in
https://github.com/WebAssembly/tool-conventions/pull/267
Fixes: #196641
Assisted-by: Antigravity
1.2 KiB
1.2 KiB
(lld-release-release-notes)=
lld {{ release | default("") }} Release Notes
:local: true
::::{only} PreRelease
:::{warning} These are in-progress notes for the upcoming LLVM {{ release | default("") }} release. Release notes for previous releases can be found on the Download Page. ::: ::::
Introduction
This document contains the release notes for the lld linker, release {{ release | default("") }}. Here we describe the status of lld, including major improvements from the previous release. All lld releases may be downloaded from the LLVM releases web site.
Non-comprehensive list of changes in this release
ELF Improvements
Breaking changes
COFF Improvements
MinGW Improvements
MachO Improvements
WebAssembly Improvements
- Added support for resolving and merging common data symbols (allocating them into .bss.common in executable/shared module links, or merging them with max size/alignment in relocatable -r links). See https://github.com/WebAssembly/tool-conventions/pull/267