llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[NFC][lld][ELF] move the commone interface "initSymbolAnchors" to "Writer.cpp"

Open coderchenlin opened this issue 2 years ago • 1 comments

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.

coderchenlin avatar Aug 04 '24 06:08 coderchenlin

@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.

llvmbot avatar Aug 04 '24 14:08 llvmbot