[lld] [LLD][COFF] Introduce hybrid symbol table for EC input files on ARM64X (PR #119294)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 9 16:10:08 PST 2024
cjacek wrote:
This is the beginning of a separate namespace implementation required for hybrid ARM64X image support. This change introduces just enough functionality to handle both native and EC load configs passed to the linker. This is how it should work, but there are still many missing pieces. In particular, CHPE metadata should only be present in the EC version and copied over to the native load config. I’ve created an [arm64x-loadcfg](https://github.com/cjacek/llvm-project/commits/arm64x-loadcfg) branch with additional ARM64X load config fixes to provide a clearer context. For now, I build the native load config from `loadconfig-arm64ec.s` in tests, which also contains CHPE metadata. To keep it working, I continue to use `ctx.config.machine` for the condition defining `__arm64x_*` and `__hybrid_*` symbols. Ultimately, this should use `symtab.isEC()`, like it’s done in the arm64x-loadcfg branch, but that requires additional changes. I kept this initial version simple to facilitate incremental development.
A lot of existing code assumes a single symbol table. Most of the remaining ARM64X changes will involve:
- Modifying the code to use `symtab` instead of `ctx` in cases that need to operate on a specific symbol table (similar to how it’s done for `InputFile` here).
- Modifying the code to use `ctx.forEachSymtab` in cases where the same operation needs to be performed on all symbol tables.
- Using `ctx.symtabEC` for code specific to the EC symbol table (many of these changes are part of the arm64x-loadcfg branch).
I will create separated PRs for changes preparing for the final commit.
https://github.com/llvm/llvm-project/pull/119294
More information about the llvm-commits
mailing list