https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104027
Bug ID: 104027 Summary: [12 Regression] libgnat-12.so requires executable stack on x86_64-linux Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: jakub at gcc dot gnu.org Target Milestone: --- while libgnat-11.so didn't (and some earlier too). Seems the reason is a-nbnbig.o, which is empty and doesn't have .note.GNU-stack section. gnat1drv seems to exit (0) during the middle of compile_file, which means it skips a big part of toplev.c (compile_file) cleanups, in particular targetm.asm_out.file_end (); for this case.