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

    <tr>
        <th>Summary</th>
        <td>
            CREL relocation table contains addends even for RELA-type psABIs
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    It looks like CREL relocation tables contain addends even for ARM32 and i386. This deviates from their psABIs, where addends are typically stored at relocated places.

For RELA-type psABIs, can LLVM store addends at relocated places instead of in CREL tables?

I see two reasons for doing so:

1. It aligns more closely with the baseline psABI and simplifies support for other tools that expect addends to be at relocated places rather than in the relocation table. This is our motivation (https://github.com/rui314/mold/issues/1430).
2. Since CREL was designed to save disk space, storing addends in CREL isn't ideal. Eliminating addends can save one byte per relocation.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8k0GP4jgQhX-Ncyl1lDgEyCEHZrYjIdEXdrV3Jy5ILY4duSqw_PtVCMz0zozm5IPtV_XVq2eY6ewRa1V-UVp_GL4czV1prco_EjNJH2IdJyryVdIGe6_3Ai6EC4OjC8LX4_sBIrrQGaHgQUzrkKELXgx5MNaitwx4RQ-nEGF3_Cg0GG-Biu06hb96YrB4JSPIcIphAOmRIoy8-7Jnpb_CrceI35RMRJD7SJ1x7g4sIaIFI68e0MLoTIecqmynsl0TIhzfD7s3uY_4SbQzHg6Hvz8Whe_qPwsBeRY0FsIJyC_AC6UqmqXIHhgR5BYgouHg-YFqA_kzcFDFbnmWp7AXMI7OnmGYy3YuMLo73Ej6mRtaw-jIPzt9zIlpGB2dCBl4GscQ5aEepMcIEoJjkN4I4L8jdvKNRAK0-EueaJavvfEz0Fz2RwOfvhBDmCIMQei63Cq97UVGnpl0o3RzJumnNu3CoHSzrInSzRCcVboh5glZ6SZfFZnS1eyJTuFP8t1zc25mdv-xgHZumc0VwRJfgEfT4ezUbNA8yBfYywNir_RGgCwal8K7o4G8kc9PZ5MfisEjtHdBGDF-gk0TWxe2KiqTYJ1vVlqvdV5tkr4u7LpaZ21VdHazxa49lYW1BjcrRNxWWZVQrTNdZkW-zfJVka_T0hZludHlSWfbHE-ZWmU4GHKpc9chDfGcPKZR50W-ycrEmRYdPzPn8QaP22fqYj1_emunM6tV5oiFv8sIicP6l7l7xY5_zt2PGUim6OrfWDmXex5vYwz_YCf_M3ShuNb6vwAAAP__wqBuCw">