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

    <tr>
        <th>Summary</th>
        <td>
            [Regression] Clang stopped adding Build ID information
        </td>
    </tr>

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

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

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

<pre>
    Using this small example program:

```
int main() {
    unsigned long x = 0x00007fffffffe8f8;
    unsigned long *addr = &x;
        return 0;
}
```

compiling it with clang-15 and clang-16 and attempting to print the Build ID I get the following output:

```
➜  ~ clang-15 -g t.c -o with
➜  ~ readelf -a with | grep "Build ID"
readelf: with: Warning: Gap in build notes detected from 0x401047 to 0x401054
    Build ID: aabbd3a932308269de34b952bc64ec135a55c6c8
readelf: with: Warning: Gap in build notes detected from 0x401021 to 0x401045
➜  ~ clang-16 -g t.c -o without
➜  ~ readelf -a without | grep "Build ID"
readelf: without: Warning: Gap in build notes detected from 0x1041 to 0x1065
```

Without it, GDB cant find the correct separate debug information to read from.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVEuP-yYQ_zT4MkqEefhx8CGPf_7aa6Vqz9hghwqDBeNueulnr2wnm7ba3WqlIgsDnvHvAYNKyQ7emIbII5HnTM14DbFprXM2eGWzNug_ml-T9QPg1SZIo3IOzE2NkzMwxTBENRJ-IPRM6KMv6P1Zp9YjjMp6wirCaiDlcVsHAJj9iq_BBT_ADQg_A71RSmnZb81UfUX4pymEHZTWcU0krLj9I3Rp0eAcPdD3D6Q8f0hz67swTtYtci3Cm8UrdE75YZdLUF4_JsU6UYhmnHD1JsAUF6F4NXCcrdPwcoYXGMy21AfnwtsSGWacZvzaMfKDkfoHqU8Afz7xdwPgvoNdWHl9EBmN0sb1sFMbc1KeYIhmAsLYgxNhbMu8BxN-2H7HD_Cqord-WIY_1QTWQ7tm-YAmgTZoOjQa-hhGoDdBcyrKRfk2luJp_DsaP4BSbau5qjnjtGJFrQ0XbS1Z2xXCdDmXSsqu6Kr_kRbLn7SE_NzT4l-ehhn_29Yw47ecDetuf1NFTsVdQ04L-cV5fb0zskjYCX6ej9Apj9Bbr9eD14UYTYeQzKSiQgPatPMA1vchjgpt8AvMQnmF3me64brmtcpMkxeVELQWLM-ujRQ1lYwxUbJK85bntC4qKvJe9GVZFEVmG0YZpzKv8pzTvN5r3mrBJBM97eueV0RQMyrr9s79Pu5DHDKb0myagpW1zJxqjUuPeyg2S9CunYdEBHU2YXqmoUW33li_mCGalGzwRJ7htGwqJAzTZDQorZdye6_FvynO5uiaK-KUljJkF8Iug8Xr3O67MBJ2WYDur90Uw2-mQ8IuK9lE2GXl-1cAAAD__6IokeM">