[fpc-pascal] Get all caller adresses of a given function/procedure before executing
Marco van de Voort
marcov at stack.nl
Sat Aug 11 17:34:44 CEST 2012
In our previous episode, Rainer Stratmann said:
> > > There are not many different ways for a call.
> > >
> > > http://css.csail.mit.edu/6.858/2011/readings/i386/CALL.htm
> >
> > Yes, so the amount of effort may increase drastically. New CPU may bring
> > new ways too.
>
> But not the 80x86 CPU. It is still the same opcode for a call ($E8).
Maybe not the call, but changing or adding address encoding is quite
realistic.
I assume you tested your code for PIC cases (which are quite common on
*nix?)
http://en.wikipedia.org/wiki/Position-independent_code
FPC supports PIC
And of course finding a perfect starting point so that you don't find false
positives when you find $E8 inside the address (change 1 in 256 obviously)
More information about the fpc-pascal
mailing list