llvm-project
llvm-project copied to clipboard
[NFC][lld][ELF] move the commone interface "initSymbolAnchors" to "Writer.cpp"
When I implement linker relaxation for a target, I notice the function "initSymbolAnchors" is defined in "lld/ELF/Arch/RISCV.cpp". but it looks like it is a common interface, and was used in RISCV and Loong architecture. Also, this function is independent of targets. Thus, I think taking this function in "lld/ELF/Writer.cpp" would be more reasonable.
@llvm/issue-subscribers-lld-elf
Author: chenlin (coderchenlin)
When I implement linker relaxation for a target, I notice the function "initSymbolAnchors" is defined in "lld/ELF/Arch/RISCV.cpp". but it looks like it is a common interface, and was used in RISCV and Loong architecture. Also, this function is independent of targets. Thus, I think taking this function in "lld/ELF/Writer.cpp" would be more reasonable.