Hi - > > Well, no, it doesn't. There's no equivalent C "signature" generated > > by the compiler for a random optimized clone of a function, which you > > could use to take ABI heuristic shortcuts to generate interoperable code. > > The generated signature is based on the information in llvm. > It is a best effort. [...] > Of course, there are some complicated cases (esp. -O3) which makes to > get changed signature difficult.
> > > Not sure how to recover the true signature from the above? > > > > Perhaps this is the wrong way to think about it. There is no "true > > signature" per se that is necessarily expressible in C. [...] > Unfortunately, our linux kernel tracing facility needs a signature and > a true signature makes tracing at least removing one headache > for users. Interesting. > As you mentioned, I guess it is possible to parse locations to find > the true signature. [...] There is no general mapping from location list expressions to a "true signature" C code, which can compile down to compatible object code in the sense of intercallability/ABI. A clever tool would be able to search DWARF location lists to identify the subset of optimized/static functions that do happen to end up with ABI-standard parametrization. It sounds like there is a hope to delegate this analysis to the original compiler instead, and are looking for a place where it could report that result? - FChE -- Dwarf-discuss mailing list [email protected] https://lists.dwarfstd.org/mailman/listinfo/dwarf-discuss
