[PATCH] D49383: [cfi-verify] Support cross-DSO by treating certain calls as traps.

Joel Galenson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 27 13:53:08 PDT 2018


jgalenson added a comment.

Thanks for the explanations!  pcc, that example API was very helpful.  I have the core part of it working, including integration with cfi-verify and objdump.  I'll finish it up and put the patches up for review at some point.

I have a few questions:

Is there a reason you suggested the `getPltAddresses` method should return a `DataRefImpl` instead of a `SectionRef`?  The latter seems easier to use.

Is the reason to avoid having `findPltEntries` use the disassembler just to be more lightweight or avoid the extra dependency?  Re-implementing even just a tiny portion of it seems a bit strange to me.

The 64-bit x86 PLT format seems pretty straightforward, but the 32-bit format seems to contain just an offset from the beginning of the GOT.  Am I missing a simple way to use that to compute the GOT virtual address for a PLT entry, or do I need to extend the API to give it a way to compute the GOT base address?  Also, I assume it's fine for X86MCInstrAnalysis to try both the 32 and 64-bit decodings to see if either matches.


https://reviews.llvm.org/D49383





More information about the llvm-commits mailing list