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