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

    <tr>
        <th>Summary</th>
        <td>
            arm unwind directives being emitted regardless of -fomit-frame-pointer and -funwind-tables
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            backend:ARM
      </td>
    </tr>

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

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

<pre>
    Original report https://github.com/ClangBuiltLinux/linux/issues/1191

for 32b arm targets, it seems that the presence of `-fomit-frame-pointer` and `-funwind-tables` cause gcc to elide emitting `.fnstart`/`.fnend` assembler directives related to unwinding. https://godbolt.org/z/vWPxon

https://sourceware.org/binutils/docs/as/ARM-Directives.html

This is causing issues for the Linux kernel, as it seems the presence of these may be resulting in references to `__aeabi_unwind_cpp_pr0` which is not provided by the kernel (and it does not link against any compiler runtime intentionally).

This is resulting in linkage failures for 32b arm targets when using "randconfig" to generate variations of linux kernel configurations.

cc @smithp35 @stuij 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8lM2O4zYMx59GvhAJFDnxTA4-ZGeQUxctFgV6DPRB29yRJUOiM5s-fSF70CaDQS-SIIkU-SP_0jlTHxBbcfgmDq-VnnmIqQ1k3xxmPftAmHJloru1vyfqKWgPCaeYGAbmKYv6JNRZqHNPPMxma-Mo1PnF69B_m8nzbxTmX0Kd_cdMOc-YhTrvdsedkK9CntaxiwlqZUCnEVinHjkL9QLEkBHHDDxoBh4QpoQZg0WIHYhGbro4Em-6pEfcTJECYxKNBB3cejyHdwpuw9p4zOXE6jkj9NYCR0BPDgFHYqbQF4ttFzLrxKKRJbNlA4NbfOaMo_GYwFFCy3TFDAm9ZnTF2foUhX77GU50JnrextQLdf5bqPP1rz9-xXAP4NEixzlZfNcJP4wMhZnJF3Qu2jLpMpx-fN-8_hvMduDR3zv9c6AMlJecS34rfiiwC8ulOvCGKaAvtHW-B_7ImgfMCKO-gUFImGe_EKMACTtM5VouEEQjLxeN2tBl5XGx03SZkiwE3weyQwkoRIYpxSs5dGBuy2trHCDUcykeMbiI601P4Q10rylkBh1uYOM4USlEmgPTiFDqHphi0N7fhDpuv6LwEHXxqXuETpOf0weUTx0I7wMGWNEJpZIOzsbQUS-UKrn2GDBpRrjqRLo8nwsqf4cVVoM5rccPcVkLYi_zSDxM9WFZ80w_oXJt7Y71UVfY7prjk1JKSlkN7fO-lrjvrLUNqsOzRaNqfDp01nSNQ9NU1Cqp6p3c1bvnulZyKxurbbNvjHFm96SU2EscNfmt99extFa1tETbHKWSldcGfV4-A6XMXNIU6qWstX0rIqhPpx_fy-7htUpt8bExc5_FXnrKnP_zysQe24JybYJ7xRgsPBfNoYOEvU7OY17QfSXnRcufhFzNybf_8wOVQD6mzZTiT7R8__ss6f4TAAD__2Ucrwc">