https://sourceware.org/bugzilla/show_bug.cgi?id=20648
Bug ID: 20648 Summary: over cautious .cfi_sections consistency check Product: binutils Version: 2.28 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: mpf at gcc dot gnu.org Target Milestone: --- Created attachment 9538 --> https://sourceware.org/bugzilla/attachment.cgi?id=9538&action=edit Proposed patch .cfi_sections had consistency checking added as part of support for new compact eh_frame sections. The original check was simply to disallow any variation in the sections specified when multiple .cfi_sections directives were seen. This caused some issues as the directive is supposed to allow additional sections to be listed via multiple instances. As it happens the original compact eh support did not actually prevent switching to the compact form if the first .cfi_sections came after the first CFI data: .cfi_startproc .cfi_sections .eh_frame_entry .cfi_endproc The fix for PR gas/19614 fixed both the issues above but ended up still left the consistency check more aggressive that it needs to be. For background... the need for the consistency check comes from the change in behavior of all the other .cfi* directives depending on whether the original or compact form of eh_frame is to be generated. Other non-GCC users of gas however now face a change in behavior that is not technically necessary. I.e. llvm as per https://llvm.org/bugs/show_bug.cgi?id=29017. A reasonable fix would be to make the consistency check specifically about the one problem case where one turns on compact EH after emitting CFI data. This could be done by looking at the compact_eh global changing from false to true (when cfi_sections_set is true) but that would allow the following which may be misleading: .cfi_sections .eh_frame_entry .cfi_startproc .cfi_sections .eh_frame .cfi_endproc I.e. the use of .eh_frame may mean a user expects the non-compact form. Instead we can check if a new .cfi_sections specifies either of .eh_frame or .eh_frame_entry and if so verifies whether this is now different from what was there before. Specifically it means the testcase directly above is rejected and the one below is accepted: .cfi_sections .eh_frame .cfi_startproc .cfi_sections .debug_frame .cfi_endproc -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils