On Wed, Nov 28, 2018 at 04:59:25PM +0100, Jan Hubicka wrote: > Hi, > I wonder how __return_loc sections work. In general it would be nice to
You mean how it's used? It's for patching in/out return instrumentation at runtime, and to find them we use the sections. > avoid direct output of assembler code in favour of adding instructions > to rtl stream which should be possible to insert the call and return. That would be a full rewrite how all these hooks work. I was hoping extending the existing frame work would be good enough for now. > __return_loc seems harder, also I wonder if it makes unwind information > possible? Do we need unwind information for calls? I thought it was only for other stack manipulation. -Andi