Messages in this thread | | | Date | Wed, 05 Nov 2014 17:13:08 +0000 | From | "Jan Beulich" <> | Subject | Re: [PATCH, RFC] x86: also CFI-annotate certain inline asm()s |
| |
>>> Andy Lutomirski <luto@amacapital.net> 11/04/14 8:40 PM >>> >On 11/04/2014 01:24 AM, Jan Beulich wrote: >> The main obstacle to having done this long ago was the need to >> determine whether annotations are needed in the first place: They need >> to be avoided when a frame pointer got set up. Since I can't see a way >> to determine this before the compilation phase, this is being achieved >> by inspecting the memory address generated by the compiler in an >> interposed assembler macro. Of course this isn't really nice code, and >> this the main reason I'm posting this as RFC only at this point (with >> the hope that maybe someone has an idea of how to achieve the same >> thing in a more elegant way). > >Ask binutils for help?
Binutils know as little about the code the compiler generated as we do.
>Is the issue that the CFI annotation you need is different depending on >whether there's a frame pointer or not?
No - as said above, they need to be avoided altogether when there's a frame pointer.
> If so, can you add some >comments so that mere asm mortals have some prayer of understanding how >your magic works and what the desired output annotations are in the >various cases?
Honestly I have a hard time seeing where comments would help here. Plus the difficult part isn't how the annotations look like, but (see above) simply whether to emit them at all.
Jan
| |