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

    <tr>
        <th>Summary</th>
        <td>
            [BOLT] Optimized binary has premature terminator entry warning
        </td>
    </tr>

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

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

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

<pre>
    Optimizing this [binary](https://github.com/Zentrik/temp-binary-store/blob/main/libjulia-internal.so.1.12.0.original?rgh-link-date=2024-04-17T18%3A33%3A58Z) with `-split-functions -update-debug-sections -split-strategy=cdsplit` and this [profile](https://github.com/Zentrik/temp-binary-store/blob/main/libjulia-internal.so.1.12.0-prof.merged.fdata) causes the following warnings to show up:

``` 
$ llvm-dwarfdump --debug-aranges libjulia-internal.so >/dev/null
warning: address range table at offset 0x0 has a premature terminator entry at offset 0x10
warning: address range table at offset 0x0 has a premature terminator entry at offset 0x20
warning: address range table at offset 0x0 has a premature terminator entry at offset 0x30
warning: address range table at offset 0xb20 has a premature terminator entry at offset 0xb30
warning: address range table at offset 0xb20 has a premature terminator entry at offset 0xb40
warning: address range table at offset 0xb20 has a premature terminator entry at offset 0xb50
...
warning: address range table at offset 0x12af0 has a premature terminator entry at offset 0x12f00
warning: address range table at offset 0x13aa0 has a premature terminator entry at offset 0x13d50
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8lTFvtDgQhn-NaSyQGQMLBUWiPaqTvuar0g3rAZwYG9kme3u__gRLcjrpFGmLREJYWPY8My_2OxiCHi1Ry8pnVp4TXOPkfPtCNnr9lvRO3dpfS9Sz_lvbkcdJB87K515b9DdWnhnUU4xLYPKJQcegG3Wc1j67uJlBd4Rh0EWal_S-Kw3ReWLQ9cb1DLoZtWXQGd2_rkZjqm0kb9FkwWV5lkMmMuf1qC0aJjs_TqnR9i1VGInJMwgoUlGk-el3XjMo5ZOU-1DWLwwaftVx4qwSaViMjumw2kvUzgaerssWIlXUr2Ma6GP6vi5Ej5HGG5Pni9qnWCU4WvUpweLdoA39lAbpxstm8iOpbFAYcavugmugwONEfHDGuOv2k67orbZj4NHxMLkrX5ctNXFm4uNdifvDj28ouDHvc6qu6Ae1zgtPD2HQox0p8P9LjTP5B4NO0TuDzq7G3KMdfCafOCrlKQS-B-ERe0McI3fDEChy8ZfgEwaOfPE0Y1w98Uh-1haj83wT7vaf5bn4bgJ8O0E-TujhQUb_I5DiJyDlAcmy7GFaDjg8esJgEI-XlUvER0FSfZT2eRsT1UrVyAYTavNTLiuZl3WTTC2opkGlaqnKvCRASXlenSpUxVDXQ60S3W4-KAoQeVVUUGekLiUWTY5DWdZ0qlkhaEZtsu2aZ86PiQ5hpbZuSlEnBnsyYe8BAM-__vzNALZu4NvdFfp1DKwQRocY_g0QdTR739g3lGd-9AlS_G5yuyBfyHEInKzetF8Y6AY8hs0EX-kSGXR7-oFBt1fwTwAAAP__w3NGtQ">