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

    <tr>
        <th>Summary</th>
        <td>
            [x86] __stack_chk_fail introduced by -fstack-protector-strong ignores -fno-plt
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          samuel-lee-msft
      </td>
    </tr>
</table>

<pre>
    When compiling with options -fno-plt and -fstack-protector-strong, introduced calls to `__stack_chk_fail` use PLT.

https://clang.godbolt.org/z/EfenK53oe

This inhibits the use of the -fstack-protector-strong in environments which do not support the use of PLT.
This looks similar to #52645, but in slightly different circumstances.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9Ub2OnDAQfhpoLJAxmIWC4pLLNUmR4qSUK9sY7KyxkcfcZvP0GYii3US6SIBnsOb7GxnG2_DNaE9UWFbrrJ_J1SZDwpps8ECKyYdidYkIP2IDSahLscaQtEohFpBi8HPGPhLrsRw3pUeihHNAUiBZS8_nY-SszOU8CevwF9lAk69fXsuMPmf06ffXpLRCVj9l7AUf5YSfyzmMMrhUhogMLz_x_TRp_5nXQT-OvhoLSG-stAlpjT4IwnSU70nGAaL9m8V60R7nrsYqQ8ZAfEgEtnUNMT2C3QUffC6ECxCwi3UiHl5ZzVnb8D0LuaUdH5ydTXI3Mtpp0hFpiLJRbQtK8kpDmY9DPfZ1L_Jkk9NDxj_86NqMP5N_Y3uMV97-42r2Ier72vItuuHvbGdc7yZL3Dc2zr39OXaw7wiGrQXYNGDBm65qczPoqaKMS1qfqr7mlNd938qWTl0lGy57mjshtYPdQMaY11dyQGCNZnI7MMoYbWhXcdrRujzRdlLdiTdM9Ey0U9ZQvaDLctexrzuPwyFJbjPgpbOQ4H4pANCnPvLa8cWWTIgDiGXTrnBaFwtMKT8kDIeFXzo0-KA">