diff options
author | Dominic Chen <d.c.ddcc@gmail.com> | 2016-08-02 18:01:26 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2016-08-02 18:01:26 -0700 |
commit | 959bc7638aebb27fcdf7079daf0d0cafe845f56a (patch) | |
tree | b828306bed585ccda4102219c187fd8dbbe08eaf /src/ast_utils.h | |
parent | 4268555dfd7887ff1110fb02717807f42616125e (diff) | |
download | binaryen-959bc7638aebb27fcdf7079daf0d0cafe845f56a.tar.gz binaryen-959bc7638aebb27fcdf7079daf0d0cafe845f56a.tar.bz2 binaryen-959bc7638aebb27fcdf7079daf0d0cafe845f56a.zip |
support pre-assigning indexes for functions that are called indirectly (#616)
This patch adds support for an ".indidx" primitive that pre-assigns table indexes for functions that are called indirectly. It is used by the upstream LLVM WebAssembly backend to support fine-grained control-flow integrity for indirect function calls by emitting instrumentation at each indirect call site to check that the destination index is within certain ranges that correspond to disjoint equivalence classes of indirect call targets. The reason that this primitive is necessary is because the layout of the table section isn't determined until the WebAssembly linker is executed, but indirect function to table index mappings need to be known when opt is executed to generate the correct range checking in the LLVM IR.
Diffstat (limited to 'src/ast_utils.h')
0 files changed, 0 insertions, 0 deletions