Hooking of CFG

Ian Lance Taylor iant@google.com
Tue Aug 8 21:47:00 GMT 2006

gunman@cs.aau.dk writes:

> We are wondering if it is possible to hook when the CFG is built in
> GCC, i.e. like it is done with lsm and the linux kernel. We are only
> aware of the GEM framework for doing this, but as we understand it, it
> is only possible to hook the preprocessor, AST, and the assembly code
> generation components of GCC.
> This is because we want to build a CFG which only include system calls
> to the kernel, i.e. we only want a CFG with basis-blocks containing
> system calls.

You can, of course, edit the source code to do whatever you like.

If you mean: is there an API for adding CFG hooks such as you
describe, then the answer is no.


More information about the Gcc-help mailing list