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

    <tr>
        <th>Summary</th>
        <td>
            [BOLT] If the compiler includes the -static option, Bolt cannot run properly.
        </td>
    </tr>

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

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

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

<pre>
     
If the compiler is invoked with the -static option during compilation, using bolt optimization will result in a segmentation fault. It runs normally without the -static option.
 
My compilation option is `clang -Wl,-q -Dconst= -Wall -Wpointer-arith -Wstrict-prototypes -Os -std=c89 -static`

![image](https://github.com/llvm/llvm-project/assets/81171521/8e481bf8-dafe-4ee5-843c-66616544acd5)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUkk-PnSAUxT8NbghGQPyzcDFvzEsmaTOLNnnpEhGVFsHCZSavn77R917apLPpRg3Xe885l5-M0cxO6w6JExJ9JhMsPnTfknRfFllkgx-vHUZFj4qnlwnDorHy62asDthEbNyb_6FH_G5gOYokggSjsN_AeIfHFIyb7y1yP0LsGae4Hw7ewvHfan4dJfxurMVBx2QBG4cljnpetYNbdZLJQo5fAIfkInY-rNLa66HtE3wgn9983-1_vv7t4-HQRIyqQlnpZkwuFrFn8hOTXnkXAfEek4u0FpPL5o0DHYgMe1RyiRCMArIFDx6um46YvMZdf0S8V037sIKq4iZ_fzKKxMmsctZI9Ig1C8AWEX9C7IzYeTawpCFXfkXsbO3b47XrfNcKEDvLGDVExM4NpTUVjO6fumzoMDVklJMmpdaCNCVXpKoqWomylGoUiLU3C9nY8bHlrcx0t0_gZc2FyJZO1g2bqqrirdSlqEaqmBy4qLSilLVtmZmOFawsBC0oZ4yLXLV1PU1qqEup5CAGVBZ6lcbmu-fchzkzMSbdtbTmbWbloG08SGPs9PrpK2JsZy50R8QhzRGVhTUR4p8BYMAedB4Nosf_UOiUTaOOH9z_ztppp0xJ5_zBDd6C33Sw1zxLwXb_vf0jz779I9LvAAAA___SfQyU">