Patent ID: 7181737

Claim:
A method for statically allocating a procedure return address, comprising: separating a software program into a cyclic part and an acyclic part, said software program comprising a plurality of procedures, wherein said cyclic part includes at least one possible execution path having a procedure in said plurality of procedures calling itself, directly or indirectly, and said acyclic part includes procedures in said plurality of procedures that are not included in said cyclic part; allocating a static address for a first procedure return address; and modifying at least one procedure in said acyclic part of said plurality of procedures to refer to said static address for said first procedure return address wherein upon execution of said at least one procedure and said procedure in said cyclic part, said procedure in said cycle part accesses a call stack to obtain a second procedure return address for said procedure in said cyclic part and said static address is used to obtain said first procedure return address without accessing said call stack to obtain said first procedure return address.