[llvm-dev] LLVM CFI Jump Tables - Storage of Beginning Address

Shishir V Jessu via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 5 12:03:41 PST 2019


Hi,

I am looking into Control-Flow Integrity for indirect function calls,
implemented with jump tables. Each jump table consists of all
address-taken functions in the program of a certain arity, or number of
arguments. At each call site, the assembly code takes
the start address of the relevant jump table and performs a range and
alignment check for the address of the function
being called.

My question is: how does LLVM keep track of the start of these jump tables,
as well as their size? I see code to generate
jump tables in LowerTypeTests.cpp
<https://llvm.org/doxygen/LowerTypeTests_8cpp_source.html>, but it's not
clear how the starts and sizes of the jump tables are maintained. If someone
could point me to the code responsible for this bookkeeping I'd appreciate
it!

Shishir Jessu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191105/4424a2b1/attachment.html>


More information about the llvm-dev mailing list