Execution program generation method, execution program...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

Reexamination Certificate

active

06715142

ABSTRACT:

BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates to a relocation technique for relocating address information in a program when loading program codes executed on a computer system into a memory, and more particularly to a relocation technique for optimally relocating, during execution, execution program codes partially including encoded code portions and configured so as not to be decoded until their execution is required.
More particularly, the present invention relates to a relocation technique which enables programs including encoded code portions and configured so as not to be decoded until their execution is required to be generated using general purpose compilers.
2. Description of the Prior Art
With recent developments in technical innovation, various types of information processing apparatuses such as workstations and general purpose computers (PC) are being developed and are put on the market. The basic structures of such information processing apparatuses are a processor and a main memory. That is, the processor executes program codes loaded into the main memory and writes the work data to a work area of the main memory. The processor generally executes various types of program codes under control of an operating system (OS).
One of methods of deciding locations or memory addresses on the main memory into which the program codes are loaded is absolute addressing. The absolute addressing uniquely decides memory addresses in a certain unit such as hardware, process, and job. When programs using the absolute addressing are started, if the programs cannot be allocated to intended addresses, the rewriting or relocation of address information in the programs is required. Some operating systems mandatorily perform relocation each time a program is started, without in advance deciding program allocation addresses.
On the other hand, relative addressing (also referred to as PC relative addressing or the like) is available as a method of specifying memory addresses. The relative addressing specifies memory addresses by differences from the address of an instruction currently being executed. Use of the relative addressing eliminates the need to specify absolute addresses to transfer execution control to specific addresses or access memory contents stored at specific address. Therefore, program codes represented by the relative addressing can be executed without performing relocation processing even if they are allocated to any memory addresses, so that the relocation processing is not required as a rule. In a word, start processing can be eased. Therefore, some operating systems assume that program codes are represented by relative addresses.
There is a recent trend toward compressing program codes to reduce a storage capacity necessary to store programs, encrypting program codes to prevent illegal use by analysis and tampering, or encoding program codes for other purposes.
Where an entire program is collectively encoded, if processing is left to a loader of an operating system after program codes have been temporarily decoded during program execution, normal execution of the program can be guaranteed.
On the other hand, some techniques apply encoding not to an entire program but to only part thereof. For example, for a large program size, if the entire program were compressed, a long time would be required for decompression processing at start time. Therefore, the program is compressed only partially and decompressed for execution as required after start. This makes the start of the program faster, compared with the method of compressing the entire program. Also, this method has the advantage that total processing time is reduced, since compressed portions need not be decompressed if they need not be executed. Alternatively, by partially encrypting programs and configuring them so that encrypted portions are not decoded until their execution is actually required, illegal use of the programs by analysis and tampering can be satisfactorily prevented.
However, some types of operating systems disable the rewriting of execution program codes during execution for the following reason.
1. Recently, computer viruses cause a big public concern. Some types of computer viruses cause infection upon rewriting of program codes during program execution. To prevent the infection of such types of viruses, the rewriting of program codes during execution is inhibited.
2. When a single program is started more than once, in terns of use efficiency of computer resources such as memory, it is desirable to share single program codes among programs individually started. On the assumption that programs are rewritten during execution, for example, while one program is performing rewriting, if another program initiates rewriting, program mismatch would occur and a facility for preventing the mismatch would be very complicated, with the result that the processing efficiency of the operating system is reduced. Accordingly, the inhibition of rewriting during program execution eliminates provisions for such mismatch and simplifies the mechanism of the operating system.
In other words, there is the problem that, in a type of operating system inhibiting the rewriting of program codes during execution, programs cannot be configured so that they are partially compressed or encrypted and are decompressed or decoded as required during execution.
On the other hand, several operating systems provide system call functions for executing instruction code strings generated on a data area, that is, for changing the attributes of a memory area (readable, writable, executable, etc.) or maintaining compatibility with CPU cache. Win32 API supported by the Microsoft's operating system Windows provides VirtualProtect() and FinishInstructionCache() system call functions, the United States Apple Computer's operating system MacOS provides a MakeDataExecutable() system call function, and UNIX family operating system Linux provides an mprotect() system call function. Use of these functions makes it possible to execute instruction code strings in a data area. Since the data area can be freely modified during execution, as an area for decoding an encoded code area, it may be allocated in a data memory area different from a program code area so that decoding is performed within the area and decoded codes are executed within the area.
However, if a code area to be encoded contains an instruction to transfer execution control to a specific address outside the code area or to access memory contents stored at a specific address, since address information of the instruction code is represented by a value (difference) relative to a calling destination or memory reference destination, an address change in the code area entails a change in relative address information, so that normal execution would be disabled without some processing.
In short, in execution programs including encoded code portions and configured so as not to be decoded until their execution is required, if a code area to be encoded contains an instruction to transfer execution control to a specific address outside the code area or to access memory contents sorted at a specific address, with techniques having been heretofore disclosed, satisfactory execution is impossible on operating systems inhibiting the rewriting of a program code area.
Furthermore, programs having such a function, even if implemented, could not be generated by conventional general purpose compilers. In other words, to generate such programs requires the designing of a special compiler, leading to enormous costs.
SUMMARY OF THE INVENTION
The present invention provides a technique that enables execution programs including encoded code portions and configured so as not to be decoded until their execution is required to be satisfactorily executed even on operating systems inhibiting the rewriting of a program code area.
The present invention provides programs that are partially encoded on an operating system inhibiting the rewriting of a program code area and can

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Execution program generation method, execution program... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Execution program generation method, execution program..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Execution program generation method, execution program... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3188098

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.