<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=http://email.email.llvm.org/c/eJylUk1v3CAQ_TX4MloL49iODz5kleSU9NA_UGEY1jQYVnxsd_99sb3bJGpPqTSCgWHeezPM6ORlIC29Gn0k9IGwBvwMOwW8nPmR1HswshyVBF6VDjjLy84BYc8ST3m1yRjYvfLjh_fh6q-AWzapH9bcZdcWVLIiamch8_4IE_coCety8Cbivox4joTt6bkirF_SkpWotEUJHhV6tAIhugVhjSz5a_IH7n8XY8yXi_E4u1NWkMm22xvpBrvIRO-d_6w3XObRmT93V23102bv5UgYL7cu_d2CjScsMIJb6yJwITCET2Jy8JuDkMQEShsE50FqjyI6f7ny3v67kEMt-7rnBU9xcn545eHtO78UyZthivEYVhnP2Q46TmkshZvzwZjTbdsdvfuZwfNRh5AwZKepaVcX01CrpqGy65VshRor0fXV2GNbs6ZVouu6wvARTRhIsyeMbc17eslsjDSPxf8r0AOjjNGKdqxifVOVbde1amwlbUXV3zc9uaM4c23KBad0_lD4YYUc0yHkoNEhhvcgD0EfLOIqOCuMOhocruO0zkyYXMq-TPMR4oRgtH2D_C-AJ7SgFeBZR20P8CsXA9xuo1KsuodV9G-v6BX5>53073</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            ld.lld -Map should dump the link map even if exiting with an error
        </td>
    </tr>

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

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

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

<pre>
    ```
% rm -f a.map; ld.bfd a1.o a2.o -o /dev/null -Map a.map; ls a.map
ld.bfd: a2.o: in function `_shared':
(.text+0x1): undefined reference to `undef'
a.map
% rm -f a.map; ld.lld a1.o a2.o -o /dev/null -Map a.map; ls a.map
removed 'a.map'
ld.lld: error: undefined symbol: undef
>>> referenced by a2.o:(.text+0x1)
ls: cannot access 'a.map': No such file or directory
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydUcty3CAQ_Bp0mVqVQNbroIO3bJ_sHPIDKRAjiRjBFo_N7t8HSbuxXckpVVMw0Mx09yCsvPakLm5RPJHikbAK3AKHEXi-8BMpj6BlLkYJnOYWOEvLwQJhLxLPaTVRazi88dOn9_6Wbw33alI-brXrrgyM0QxBWQOJ94efuUNJWJPAu4g2D3gJhB2LCyWsW8uikTgqgxIcjujQDAjBrh02ZK3fij9x_9uM1v9txuFiz0lBIttv76R721UmOmfdV73-ugir_9zdtJXPe3zYkSCu9yn9PYKdx69tBm6MDcCHAb3_IiaB3yz4OMwwKo1gHUjlcAjWXW-89__OZF_Krux4FlTQ2N8ms9n3s40pl3E5QZgRtDLvkCgAz2hAjYAXFZSZ4JcKM3Czu86i0_0cwslvBl5STAmPIh_skg5an-_b4eTszyQrHZX3EX1KqrJoymzu2xqbYeQ1b2nLEWmHtKFMUFp2KDrRZpoL1L4n1ZEwto_9-TWxMVI9ZapnBWMFLRpGWVfRvG6aehS1LOqBdm3VkYcCF650vurIrZsy12-SRJx8ArXywX-A3Hs1GcSNLvXnMczW9W_cv3_n12xT32_SfwP3gACo">