On Wed, Jan 18, 2023 at 05:25:10PM +0100, Jan Hubicka wrote: > > On Jan 18 2023, Michael Matz wrote: > > > > > The purest solution is to emit unwind tables for all functions that > > > request it into .eh_frame and for those that don't request it put > > > into .debug_frame (if also -g is on). > > > > The assembler does not allow switching back to .eh_frame once a > > different format has been chosen, so .eh_frame must be either on or off > > all the way through. > > This is unforutnate (and I did not noticed this earlier). > Would it be hard to fix assembler? In general situations like this can > be handled by forced partitioning in GCC, but it is not a good solution > since we want to keep partitioning algorithm an optional step by design.
If it was just about compiler emitted .cfi_* directives, we could say use .cfi_* directives for .eh_frame and hand emitted .debug_line for .debug_frame or vice versa in the case of mixing functions with different flags. But inline asm can contain user written .cfi_* directives, so I think we need to do something on the assembler side and then adjust gcc. Jakub