<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylVMtunTAQ_RrYWBdxuXAfCxZJo1ZdtJWqVl0bM4ATP6jH3Ee_vmNDkpsmyqYS4mHPnDnneIbGtpf6-4SeJds8c0o29GTciUEegXVSATJhjefSILPNPQi_rHLTzjkaPA9JcTljP6xVyDrr2Mm6B2l6dpJ-eAEfItnAkTUAhjn4PQF6aGMSwhEcV-wC3FHA5JkfwEFS7JChl0oxYyMys4ZJT3E-Y0mxH7wfMdncJMVHunoqOTWZsJo-HMlbKW765Z0eEpFq0ktR7Ys8KQ5JfpfkN_P9iyU7bBcKk3atSSkyJR8giDCabknxIbyTH-2kx2UBvMiemP0rNwRw5Qc79cOsiMngIQPnSLUGRN4D440lxZNxIGxv5J_ZFM0jn7fcnlkIO17CIkFaAwt3HWvSKb3SsGSw1S9Ct7TcnM_nJ7qzy0FIVHWkI1p4k92ENarYDG9QfUUwu7b1lsIJAQE0EiKPLafUUa-uFLSWWsvYWEhLP5_BQGdHy96-shWZ7J5dtEJMDl8U_UyIhprHswdjTyE6II5WSXEJdhGmlloK9unrT_qg1qVg6suBH6V1wYBmpn2yk2ppg3GmiJ62LjSHIXckGB-A31DzmERowJDqKO7UZRFyfW6GCY6wnJAfJIbKo7NH2ZKv0azAG-lzBV1HU0hjySekzeYSExaXgiY4jxQQ8mwgjJortZjyLbTeSWLsx88s8qIoOHvHxVxjmf3YPOMY2D4dQQiVppXEaqIRvf4dPPYadYMD7uEaKkvbetMeNgee8olaydX3pOGyzvNDOjlVvzO6wdDlsSI7Qr3r6a02m0OVDnXZlMW63GwLUa27Zl_uD7nY7fbbdg1NW-2qVPEGFNZJdZtUd-n_l5R1kRdFvi6qvKy2ZZnlTdNV-3XRlaKgWtukzEFzqbKAk1nXp66OkM3UI20qiR6fNzmi7A3AI0MvvYL6up2eJ-PxF_P-XzuNjOtI9y87xfnW>53395</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm-objcopy does not work on Rust `.rlib` archive files
        </td>
    </tr>

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

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

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

<pre>
    Rust `.rlib` archive files contains object files and `.rmeta` files. Tools for working with `.rlib` file has been requested for several years but there's still no work on it yet. (https://github.com/rust-lang/rust/issues/25820)

Most of the commands like `nm`, `objdump`, etc. work on `.rlib` file, although there is an error message about unrecognized format of `.rmeta` files. `objcopy` is one of them, and commands like `objcopy -W foo libxxx.rlib` still work, even though it complains about unrecognized `.rmeta` file.

But it seems that `llvm-objcopy` does not commit the changes to `.rlib` files if an error occurs.

I don't know if the policy is to mimic GNU tools' behavior, but it would be a lot more convenient if `llvm-objcopy` would behave similarly to `objcopy` in cases like this, provided that the side-effects caused by this change is expected to be small.
Otherwise, I have to extract the archive, apply the change to individual object files, and recreate the archive.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VNtunDAQ_Rp4GS1i2WW7-8BD0qhVH9pKVas-GxjAiS_UY_bSr-_YkGTTRJEQF3t85pwzM9S2vVQ_JvKQ7PLMKVnzE4RrBnlE6KRCgsYaL6QhsPU9Nn5ZFaadz2j0IhyKyxn8tFYRdNbByboHaXo4ST-8gA-RMAiCGtGAwz8Tksc2HiI8ohMKLigcB0we_IAOk-IDAXmpFBgbkcEakJ7jfAZJsR-8HynZ3CTFJ756TjnVWWM1fziWt1LC9Ms7PyQR5-SXotwXeVIckvwuyW_m-1fLdtguJGbtWrNSAiUfMIgwmm9J8TG8sx_tpMdlAX2TPTH7X24IEMoPduqHWRHI4CGgc6xaI5HoEURtWfFkHDa2N_LvbIoWkc9bbs8sGjtewiJDWoMLdx1zcpVeaVhOwOo3o1ters_n8xPd2eUgJKo6cokW3mw3Y40qNsMbVF8RzK5tveVwRiBETYwoYsspddSrKwWt5dYyNibS0s81GLh2vOztK1sJZPfsom2aydGLpF8Y0XDzeHgw9hSiA-JolWwuwS7G1FLLBj5_-8Uf3LoczH05iKO0LhhQz7RPdlItb4AAxfS0daE5DLsj0fgA_Iaax0OMhkCcRwmnLouQ67oZaAThUiE_SAqZR2ePsmVfo1mBN_HnCruOp5DHUkzEm_UlHlhcCprwPHJAOGcDYdJCqcWU76H1TpJiP36ByIuj8OydaOYcy-zH5hnHwPapBCFUmlYyq4lH9Pp38Nhr3A0OhcdrqCxtq0172BxE6qVXWF3b9Fzxx9F5_2-UTk5V7wx7wF4eKzYwMLye93KzOZTpUG3KtsV1fmh3dVcUu0Mndps1FnvEco_tfp0qUaOiKilvk_IulVWRF0W-Lsp8W-622yyv667cr4tu2xQcuUu2OWohVRYSZ9b1qZtl1lNPvKkkeXreFESyN4iP-GLiEXPVPdf2ss7zQxoJV5HtP3NZ5SE">