Patent ID: 7398513

Claim:
A method of detecting invalid function calls in a program file, the program file including code for making function calls to a plurality of functions defined in the program file, the method comprising: creating a source file, the source file defining a plurality of memory segments in the program file, wherein each memory segment in the plurality of memory segments is defined to contain at least one of the functions defined in the program file; creating a fixup source file, the fixup source file defining the plurality of memory segments defined in the source file to be a predetermined size; assembling the program file, the source file, and the fixup source file to create a program object, a source object, and a fixup object; creating a source library and a fixup library from the source object and the fixup object; linking the program object with the fixup library to generate a dummy output file; during the generation of the dummy output file, determining whether an invalid function call is made between the plurality of memory segments defined in the fixup library; and if it is determined that an invalid function call is made between the plurality of memory segments defined in the fixup library, then reporting an error in the dummy output file.