Help needed to modify prologue/epilogue expand methods...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



i386.c : ix86_expand_prologue()

/*************************************************************************************************/
x = cfun->machine->force_align_arg_pointer;
x = gen_frame_mem (Pmode, plus_constant (x, -8)) xor hard_frame_pointer_rtx;
insn = emit_insn (gen_push (x));
RTX_FRAME_RELATED_P (insn) = 1;
/*************************************************************************************************/

I am trying to push a copy of return address just below the return
address and xor it with the "frame pointer". I wanted to know if the
above code is correct for pushing the return address and encrypt it
with the frame pointer.
Now, in the epilogue I want to decrypt this copy of return address
with the pushed frame pointer and verify if the two instances
(original and decrypted) of the return address are same. This is the
first time I am working on an approach that requires to make
modifications to the ix86_expand_prologue/epilogue methods of the
compiler. I also wanted to know how to read the value of encrypted
return address in the ix86_expand_epilogue method, since then I need
to decrypt it and compare it with the original return address pushed
on the stack.

I have posted similar requests on other mailing lists but got no reply. Please,
this is critical for my research and i need help from the community.
Please provide
me with any information on the matter that you can.

Thank You.
-- 
Vaibhav Shrimali
BTech(ICT), DA-IICT
Gandhinagar, INDIA

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux