<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/101867>101867</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [NFC][lld][ELF] move the commone interface "initSymbolAnchors" to "Writer.cpp"
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            lld
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          coderchenlin
      </td>
    </tr>
</table>

<pre>
    When I implement linker relaxation for some targets, 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 does not relate to architecture. Thus, I think taking this function in  "lld/ELF/Arch/RISCV.cpp" would be more reasonable.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMkk1r5EgMhn9N-SJi7LKd7hx86CRrCIQ9bJbJuT5kW9PlUlMlJ5N_P9hpCAQG5lRfkup9pNfkTFNE7FV3r7rHwqwyc-ode0xuxhgoFpb9R_86Y4QnoOUScMEoECieMUHCYH4ZIY4wcoLMC4KYNKFkpR_gCSILOQSZEcY1uj1SaU2R5OVjsRxO0c2cstIaKIPHkSJ6oD0qBK_08M_zoPRwSm5Wevjv6eXhR-kuF6V1CXYVIIHAfM4Q6IzbiTIYcLwsHIGiYBqNw02NiR7eTYY1f_6w19pvn5njBCa5mQSdrAlLOIXMW5bMlL-0e8a8Qe3kgiD8Le3_eb2iy0zxDGLOFKdvVSjCX_DBO6_Bg0VYOCEkNJmjsQHLwveNv2vuTIF9fdD60DVNfSzmXretvau7xnpn_Ng0TeVd5w--RtN1jW4L6nWl2-pYtdVt09XH8mirarR21NVYHZrKqrbCxVAoQ3hbSk5TQTmv2NdVfbw9FMFYDHn3y1W_3oyT-i38xq5TVm0VKEv-KiAkYbfYv8OD6h5Vd78l7puNvXuEhd8-PfI5Nvya2x_NIrw9vSYSTNd-FWsK_Sxyyao5Kb11dSKZV1s6XpQeNkHX5eaS-Cc6UXrY8bLSw5Xwrde_AwAA__85MwOp">