> redriver jiang <jiang.redri...@gmail.com> writes: > > > I meet a requirement to make all function calls to be indirect > > function calling ( for I386 GCC compiler). I am not familiar with > > frontend, so my first idea is > > > > to hack it from backend, change the asm output for "call" and > > "call_value" insn patterns, generate a related varible in data > > section, > > > > and when output call insn, output indirect call. > > You could probably just change the call_insn_operand predicate to not > accept constant_call_address_operand. Or something along those lines. -mcmodel=large already promote all calls to be indirect as far as I can remember (on x86-64) but you can just grab that code for x86 too.
Honza > > Ian