On 05/22/17 14:07, H. Peter Anvin wrote: > On 05/20/17 13:01, H.J. Lu wrote: >> On Sat, May 20, 2017 at 9:20 AM, Josh Poimboeuf <jpoimboe@xxxxxxxxxx> wrote: >> >>>> >>>> (H.J., could we get a binutils feature that allows is to do: >>>> >>>> pushq %whatever >>>> .cfi_adjust_sp -8 >>>> ... >>>> popq %whatever >>>> .cfi_adjust_sp 8 >>>> >> >> Np. Compiler needs to generate this. >> > > For actual assembly we have such a feature, it is called macros. > > push/pop is the easy stuff; macros take care of that, but the real pain > is dealing with the flow of control. > My biggest beef with the CFI directives that gas uses is that there is that .cfi_remember_state/.cfi_restore_state doesn't have a way to specify more than one state. That makes it really hard to get sanity around control flow changes, especially with code that is intentionally out of line. That, and some of the CFI directives seem to be a bit ill-defined in their definition (are they even applicable to anything other than DWARF?) They almost seem to be referencing some external specification, but the only thing I'm finding is the DWARF documentation which is written in very different terms. The best description of what a personality routine is I found in an article by Ian Lance Taylor. It doesn't seem to be applicable to C as far as I can tell. -hpa -- To unsubscribe from this list: send the line "unsubscribe live-patching" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html