E
Edoules
Dear All,
I'm curious to know if there has been any efforts to allow for the
byte-order run-time editing of compiled C code.
This request is informational only, sparked by curiousity.
Hypothetical solutions I've discussed with my colleagues include
casting a function pointer to a void or unsigned char pointer
(illegal, but oddly allowed by most compilers), then buffering all the
bytes up to a known return value-- although how to write back onto the
protected page of code has yet to be solved by us, and is likely
something requiring an "unsafe"/"custom" kernel.
This is clearly a system specific problem, though an abstract overview
of how this was approached in the past would be nice.
Thanks,
Eddie Ma
B.Sc. University of Guelph
I'm curious to know if there has been any efforts to allow for the
byte-order run-time editing of compiled C code.
This request is informational only, sparked by curiousity.
Hypothetical solutions I've discussed with my colleagues include
casting a function pointer to a void or unsigned char pointer
(illegal, but oddly allowed by most compilers), then buffering all the
bytes up to a known return value-- although how to write back onto the
protected page of code has yet to be solved by us, and is likely
something requiring an "unsafe"/"custom" kernel.
This is clearly a system specific problem, though an abstract overview
of how this was approached in the past would be nice.
Thanks,
Eddie Ma
B.Sc. University of Guelph