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

    <tr>
        <th>Summary</th>
        <td>
            [lld][elf] warn on missing .note.GNU-stack section
        </td>
    </tr>

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

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

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

<pre>
    Since https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107, GNU ld (BFD) will warn when an ELF object is missing the `.note.GNU-stack` section.

Generally, we'd like code to not have an executable stack. Because some code could rely on that, we need to start migrating codebases to be built without executable stack.

We see this for the Linux kernel for asm sources. We plan to add `-Wa,--noexecstack` to KBUILD. See also:
https://lore.kernel.org/linux-block/CAKwvOdmD10yK0r1H-M2PcnZgy3M0aA9gdkY0BErDOQ+KpBRxVQ@mail.gmail.com/
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxlUsFymzAQ_Rq4aGCEMBgOHOwQpx0nbdNMmmlvElqDahl5JBHHf98VTtqmnWGEtKt97-3qCSPPzYMaOyCD90cX5auIbfBzZrIdnLiF1NgeA73yIZNvjlHeCjVOXmmX9FKkIZOvOYY7czjMhyHc4XWR8Z2o6zpjktOMl1At8kXGSlHteLfkfFlkdBmxK3Lz6ZFoSSJWrTdtxGpyUloTZB_JaYCR8JFc326IET-h80Q5clDOqbEnfgASlTQdjYcUURLnebfHCHF4U5kxjWgb0dVlvYERLNf6HDhPELGlJFrtgXRGAvGGIAwZ-DMEQniBbvJcaCAzaErW0PHJ4dEcXks6M6FsC_pMzIhiuL8gkxFABkCstB7V9pb7oDdUCe7AhaQAIialPXbrBzP5_yn_Fv-EQUCVA7a_M3Zu_Rbf4YXswY6g5yB3B3J5OpcSrDhq7ASpuJRhTskTR4FJMppA9XtWeGG7fvx426bkASm4diYYYaZ9bwtt0BAXvldf6CAhEdogFNtcrban58_y0Gb0vKU2-5DcsS_d-KM_53eUr-pe7r_T9bVtP99HbL09rr--fLuPFvTAlU77eUUTIVAMTVYWdV1ldU5j2eSyzmsee-U1NFGx1lpGRYsb0DvcXLyCb_BmjH8c8WaHeLK6ed8S2neYxCut1s9vv-RoTbAbHhFzAoebYklpHQ8N7LK8rPKyqBaMyrLOO1rmnBZLxuuMZ12suQDtgtCIsaCVseCM10O-QjeHUNHGqmGUMVrRKqtokdNUVhSKTMqlBCZFKXA6MA8miApDj20z6xNT7zCplfPuT5Jj_z3ab-ZGfD6ht2wzqm4vwfFJjwqsi-eWmrmfX5mGSck">