[go: up one dir, main page]

JP2000330780A - Software patch data automatic generation device - Google Patents

Software patch data automatic generation device

Info

Publication number
JP2000330780A
JP2000330780A JP11138244A JP13824499A JP2000330780A JP 2000330780 A JP2000330780 A JP 2000330780A JP 11138244 A JP11138244 A JP 11138244A JP 13824499 A JP13824499 A JP 13824499A JP 2000330780 A JP2000330780 A JP 2000330780A
Authority
JP
Japan
Prior art keywords
source
function
patch
added
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11138244A
Other languages
Japanese (ja)
Inventor
Yoichi Makino
洋一 牧野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Hitachi Information and Telecommunication Engineering Ltd
Original Assignee
Hitachi Ltd
Hitachi Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd, Hitachi Information Technology Co Ltd filed Critical Hitachi Ltd
Priority to JP11138244A priority Critical patent/JP2000330780A/en
Publication of JP2000330780A publication Critical patent/JP2000330780A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

(57)【要約】 【課題】高級言語で開発し,コンパイラにより最適化さ
れたソフトウェア製品に対するパッチを,修正前の高級
言語ソースと,プログラム修正者が修正した高級言語ソ
ースとを比較して自動的に生成する。 【解決手段】マスタソースを修正する手段1と,マスタ
ソースと修正後ソースとを比較し関数単位に比較情報を
ファイルに記録する手段2と,変更・追加された全静的
変数を当該パッチレビジョン用追加静的変数セクション
に配置する合成ソースを生成する手段3と,合成ソース
オブジェクトを生成する手段4と,修正後ロードモジュ
ールと修正後静的変数エリアを生成する手段5と,修正
後ロードモジュール上の変更前関数の先頭の命令コード
を,変更後関数の先頭への無条件分岐命令にパッチする
手段6と,当該パッチレビジョン用パッチコードセクシ
ョン及び無条件分岐命令のみをパッチデータとする手段
7とを備える。
(57) [Summary] [PROBLEMS] To automatically compare patches for software products developed in a high-level language and optimized by a compiler by comparing a high-level language source before correction with a high-level language source corrected by a program corrector. Generated. A means for correcting a master source, a means for comparing a master source with a corrected source and recording comparison information in a function unit in a file, and a method for updating all static variables that have been changed or added to the patch revision Means for generating a synthesized source to be placed in the additional static variable section for use; means for generating a synthesized source object; means for generating a modified load module and a modified static variable area; and modified load module. A means for patching the instruction code at the head of the above-before-change function to an unconditional branch instruction to the head of the function after the change, and a means for using only the patch code section for patch revision and the unconditional branch instruction as patch data; And

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は,高級言語で開発し
たソフトウェア製品に対するパッチデータを自動生成す
る装置に関する。
The present invention relates to an apparatus for automatically generating patch data for a software product developed in a high-level language.

【0002】[0002]

【従来の技術】従来,高級言語で開発した組み込み型ソ
フトウェア・マイクロプログラム等ソフトウェア製品に
対して修正を行う場合,「高級言語でソース修正しリン
クを取り直し全面修正(バージョンアップ)」する場合
と,「リンクをとらずアセンブラ言語によりパッチを行
い部分修正(レビジョンアップ)」する場合がある。大
形汎用計算機の場合,システム稼動時にプログラム修正
する時間を短縮するため,また修正したソフトウェアが
デグレードすることなく動作することを確認するための
検査時間を最小とするため,通常パッチによるプログラ
ム修正を行う。
2. Description of the Related Art Conventionally, when modifying a software product such as an embedded software or a microprogram developed in a high-level language, there are two cases; There are cases where "partial correction (revision up) by applying a patch in assembler language without taking a link". In the case of large general-purpose computers, in order to reduce the time required to correct programs when the system is operating, and to minimize the inspection time required to confirm that the corrected software operates without degrading, program modification using patches is usually performed. Do.

【0003】従来,前記のパッチを人手により作成して
いたが,高級言語に比べ生産性が低く,スタック操作を
誤る等バグが入り込む頻度が高い。最近ではコンパイラ
の最適化技術が格段に進歩し,RISC(Reduced I
nstruction Set Computer)プロセッサに効率よく
命令の実行を行わせる上で,ソフトウェア開発者が意図
したCPUの命令の実行順序とは異なる命令実行順序を
コンパイラが生成するため,ますますバグがないパッチ
を作成することが困難になってきている。
Conventionally, the above-mentioned patches have been manually created. However, the productivity is lower than that of high-level languages, and bugs such as erroneous stack operations are frequently introduced. Recently, the optimization technology of compilers has advanced remarkably, and RISC (Reduced I
nstruction Set Computer) In order to make a processor execute instructions efficiently, the compiler generates an instruction execution order different from the CPU instruction execution order intended by the software developer. It's getting harder.

【0004】以上のような背景から,人手によりアセン
ブラ言語を用いてソフトウェアを修正するのではなく,
人手で行うのは高級言語のソース修正のみとし,修正し
たソースから自動的にパッチデータを生成する装置が提
案されている。
[0004] From the above background, instead of manually modifying the software using the assembler language,
There has been proposed a device that only manually corrects a high-level language source and automatically generates patch data from the corrected source.

【0005】例えば,特開平5−73292公報では,
ROMのプログラムを更新する場合に,更新したサブル
ーチンをパッチエリアに格納し,そのアドレスをジャン
プテーブルに書き込み,CPUがサブルーチンを呼び出
す代わりに,ジャンプテーブルにしたがって更新後のサ
ブルーチンを呼び出すむ方式が提案されている。
For example, in Japanese Patent Application Laid-Open No. 5-73292,
When updating a ROM program, a method has been proposed in which the updated subroutine is stored in a patch area, the address is written in a jump table, and the updated subroutine is called according to the jump table instead of the CPU calling the subroutine. ing.

【0006】また,特開平10−3383公報では,修
正前のソースファイルと修正後のソースファイルの間で
差分が検出された部分を変数単位及び関数単位に分割
し,分割されたソースファイルをコンパイルし,生成さ
れたオブジェクトと修正前のオブジェクトとの差分情報
からパッチを生成する方式が提案されている。
In Japanese Patent Application Laid-Open No. 10-3383, a part where a difference is detected between a source file before correction and a source file after correction is divided into units of variables and functions, and the divided source files are compiled. There has been proposed a method of generating a patch from difference information between a generated object and an object before correction.

【0007】[0007]

【発明が解決しようとする課題】前記の特開平5−73
292公報に記載された従来の方式のように,更新され
た関数のみをパッチエリアに格納する方式では,更新さ
れた関数を自動的に検出する手段が提供されていない。
更新された関数内で静的変数が追加になった場合,静的
変数のアドレスがずれてしまい,以降静的変数を参照す
るプログラムコードに差分が生じ,パッチデータが巨大
になってしまうという問題があった。
SUMMARY OF THE INVENTION The above-mentioned Japanese Patent Laid-Open No. 5-73 is disclosed.
In a method of storing only an updated function in a patch area as in the conventional method described in JP-A-292-292, means for automatically detecting an updated function is not provided.
If a static variable is added in an updated function, the address of the static variable will be shifted, causing a difference in the program code that refers to the static variable, resulting in a huge patch data. was there.

【0008】また,静的変数のアドレスがずれることに
より,システム稼動時中にパッチ適用ができないという
問題があった。さらに,関数が追加された場合について
考慮されていないため,パッチデータが生成できないと
いう問題があった。
[0008] In addition, there is a problem that the patch cannot be applied during the operation of the system due to the deviation of the address of the static variable. Further, there is a problem that patch data cannot be generated because a case where a function is added is not considered.

【0009】また、前記の特開平10−3383公報に
記載された従来の方式のように,修正前のソースファイ
ルと修正後のソースファイルの間で差分が検出された部
分を変数単位及び関数単位に分割し,分割されたソース
ファイルをコンパイルし,生成されたオブジェクトと修
正前のオブジェクトとの差分情報からパッチを生成する
方式では,関数内静的変数が追加になった場合,関数が
追加された場合について考慮されていないため,パッチ
データが生成できないという問題があった。
Further, as in the conventional method described in the above-mentioned Japanese Patent Application Laid-Open No. H10-3383, a portion where a difference is detected between a source file before correction and a source file after correction is determined in units of variables and functions. In the method of dividing the source file, compiling the divided source files, and generating a patch from the difference information between the generated object and the object before correction, if a static variable in the function is added, the function is added. There is a problem that patch data cannot be generated because the case is not considered.

【0010】したがって,本発明は前述した静的変数,
関数を追加した場合にパッチデータが生成できない問題
を解決するためになされたものであり,人手で行うのは
高級言語を使用してソース修正を行うのみとし,ソース
修正前後でソースを比較し,修正前後の全関数を保持す
る合成ソースを生成し,マスタソース上の削除された関
数を含む全関数をマスタロードモジュールと同一アドレ
スに配置し,追加・変更後の関数を各パッチレビジョン
用パッチコードセクションに配置し,関数内で追加・変
更された静的変数をパッチレビジョンに応じたパッチ追
加静的変数セクションに配置した修正後ロードモジュー
ルを生成し,変更前の関数の先頭の命令コードをパッチ
コードエリア上の変更後の関数への無条件分岐命令にパ
ッチした無条件分岐命令パッチ後ロードモジュールとマ
スタロードモジュールとを比較し,差分情報,すなわ
ち,当該パッチレビジョン用パッチコードセクション
(修正ソースで変更し名称変更した関数・追加した関数
が配置されている)と,無条件分岐命令(変更前関数の
先頭の命令コードが変更後関数の先頭への無条件分岐命
令にパッチされている)をパッチデータとすることを自
動化することにより,コンパイラにより最適化されたプ
ログラムコードの場合でも正確にパッチを生成し,パッ
チの管理についても効率よく運用できることを目的とす
る。
Therefore, the present invention provides the above-described static variable,
This is done to solve the problem that patch data cannot be generated when a function is added. The only manual operation is to modify the source using a high-level language. Generates a synthesized source that retains all functions before and after modification, allocates all functions including the deleted functions on the master source to the same address as the master load module, and assigns the modified / added functions to each patch revision patch cord Generates a modified load module with the static variables added / changed in the function placed in the section and the patch added static variable section according to the patch revision, and patches the first instruction code of the function before the change. Load module after unconditional branch instruction patched to unconditional branch instruction to function after change in code area and master load module And the difference information, that is, the patch code section for the patch revision (where the function changed and renamed in the correction source and the added function are located) and the unconditional branch instruction (the head of the function before the change) (In which the instruction code is patched to the unconditional branch instruction to the beginning of the function after the change) is used as the patch data to automatically generate a patch even if the program code is optimized by the compiler. The purpose of the present invention is to enable efficient operation of patch management.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
に,本発明によるパッチ自動生成装置は,第1に,マス
タソースを修正し修正後ソースとする手段(図1の1:
ソースファイル修正手段)と,マスタソースと修正後ソ
ースとを比較して追加・変更・削除された関数の情報を
関数・静的変数比較結果格納ファイルに記録する手段
(図1の2:ソース比較・記録手段)と,合成ソース
(修正前後の全関数を保持し,マスタソース上の全関数
をマスタロードモジュールと同一のアドレスに配置し,
変更後の関数・追加した関数を当該パッチレビジョン用
パッチコードセクションに配置し,マスタソースで使用
される全静的変数をマスタロードモジュールと同一のア
ドレスに配置し,変更・追加された全静的変数を当該パ
ッチレビジョン用追加静的変数セクションに配置するソ
ース)を生成する手段(図1の3)と,合成ソースをコ
ンパイルして合成ソースオブジェクトを生成する手段
(図1の4)と,変更されていないソースに対するマス
タオブジェクトと合成ソースオブジェクトとをリンク
し,修正後ロードモジュールと修正後静的変数エリアを
生成する手段(図1の5)と,修正後ロードモジュール
上の変更前関数の先頭の命令コードを,変更後関数の先
頭への無条件分岐命令にパッチし,無条件分岐命令パッ
チ後ロードモジュールを生成する手段(図1の6)と,
マスタロードモジュールと無条件分岐命令パッチ後ロー
ドモジュールとを比較し,差分情報,すなわち,当該パ
ッチレビジョン用パッチコードセクション(修正ソース
で変更し名称変更した関数・追加した関数が配置されて
いる)と,無条件分岐命令(変更前関数の先頭の命令コ
ードが変更後関数の先頭への無条件分岐命令にパッチさ
れている)をパッチデータとする手段(図1の7)と,
を備えることを特徴とするパッチ自動生成装置を提供す
る。
In order to achieve the above object, an automatic patch generation apparatus according to the present invention firstly corrects a master source and sets it as a post-correction source (1 in FIG. 1).
Source file correction means) and means for comparing the master source with the corrected source to record information of the added / changed / deleted function in a function / static variable comparison result storage file (FIG. 1: 2: source comparison)・ Recording means and composite source (All functions before and after modification are retained, and all functions on the master source are allocated at the same address as the master load module.
Allocated functions / added functions are placed in the patch code section for the patch revision, all static variables used in the master source are located at the same address as the master load module, and all modified / added static Means for generating variables (source for allocating variables to the additional static variable section for the patch revision) (3 in FIG. 1), means for compiling the synthesized source to generate a synthesized source object (4 in FIG. 1), and modification Means (5 in FIG. 1) for linking the master object and the synthesized source object for the unmodified source to generate a modified load module and a modified static variable area, and the head of the pre-change function on the modified load module Patch code to the unconditional branch instruction to the beginning of the post-change function, and load module after patching the unconditional branch instruction The resulting unit (6 in FIG. 1),
The master load module and the unconditional branch instruction are compared with the post-patch load module, and the difference information, that is, the patch code section for the patch revision (functions whose names have been changed and added by the correction source and added functions are located) Means for using unconditional branch instructions (the instruction code at the head of the pre-change function is patched to the unconditional branch instruction to the head of the post-change function) as patch data (7 in FIG. 1);
An automatic patch generation device is provided.

【0012】また,本発明は,合成ソースを生成するた
め,マスタソースをコピーして合成ソースの初期値を設
定する手段(図3の31:合成ソース初期値設定手段)
と,関数・静的変数比較結果格納ファイル220を参照
し,変更されなかった関数・削除された関数に対しては
何も処理を行わず,修正後ソースで変更された関数に対
しては変更された関数の呼び出し側に対しては何も処理
を行わず,変更された関数の本体に関しては名称の先頭
等にパッチレビジョンを付加して名称変更して合成ソー
スに追加し,修正ソースで追加された関数に対しては名
称変更を行わず合成ソースに追加する手段(図3の3
2:追加・変更関数追加手段)と,合成ソースに追加し
た関数(修正後ソースで変更され名称変更された関数,
及び修正後ソースで追加された関数)のプログラムコー
ドを当該パッチレビジョン用パッチコードセクションに
配置する擬似命令を合成ソースに付加し,変更後関数の
全動的変数に対しては何も処理を行わず,変更後関数の
変更された静的変数・追加された静的変数に対しては当
該パッチレビジョン用追加静的変数セクションに配置す
る擬似命令を合成ソースに付加し,追加関数の全動的変
数に対しては何も処理を行わず,追加関数で使用される
全静的変数に対しては当該パッチレビジョン用追加静的
変数セクションに配置する擬似命令を合成ソースに付加
する手段(図3の33:擬似命令(セクション変更命
令)付加手段)と,変更前関数で使用される全動的変数
・全静的変数に対しては何も処理を行わず,変更後関数
で使用される静的変数中,削除された静的変数に対して
何もせず,変更されていない静的変数に対してはマスタ
変数エリア上のマスタ静的変数セクションの変数と同一
アドレスに配置する手段(図3の34:静的変数同一ア
ドレス配置手段)と,を備えることを特徴とするパッチ
自動生成装置を提供する。
According to the present invention, in order to generate a synthetic source, a master source is copied to set an initial value of the synthetic source (31 in FIG. 3: synthetic source initial value setting means).
And the function / static variable comparison result storage file 220 is referenced, and no processing is performed for functions that have not been changed / deleted, and changes have been made for functions that have been changed in the source after correction. No processing is performed on the caller of the modified function, and the modified function body is added with a patch revision at the beginning of the name, etc., renamed, added to the synthesis source, and added with the modified source Means for adding the function to the synthesized source without changing the name (3 in FIG. 3).
2: Addition / change function addition means) and functions added to the synthesized source (functions whose names have been changed and changed in the source after correction,
And a pseudo-instruction that places the program code of the modified source in the patch code section for the patch revision is added to the synthesized source, and no processing is performed on all dynamic variables of the modified function. Pseudo-instructions to be placed in the additional static variable section for the patch revision are added to the synthesized source for the changed static variables / added static variables of the changed function, Means for performing no processing on the variable and adding a pseudo-instruction to be allocated to the additional static variable section for the patch revision to the synthesis source for all static variables used in the additional function (FIG. 3) No. 33: No processing is performed on pseudo-instructions (section change instructions) adding means) and all dynamic and static variables used in the function before change, and static Strange change In the meantime, nothing is performed on the deleted static variable, and the static variable that has not been changed is allocated to the same address as the variable of the master static variable section in the master variable area (34 in FIG. 3). : Static variable identical address arrangement means).

【0013】[0013]

【発明の実施の形態】次に,本発明の実施の形態につい
て図面を参照して詳細に説明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0014】図1は,本発明の第1の形態の構成を示す
ブロック図である。図2は,本発明の第1の実施形態・
第2の実施形態が前提とするハードウェア環境を示すブ
ロック図である。図3は,本発明の第2の実施形態の形
態の構成を示すブロック図である。
FIG. 1 is a block diagram showing the configuration of the first embodiment of the present invention. FIG. 2 shows a first embodiment of the present invention.
FIG. 9 is a block diagram illustrating a hardware environment that is assumed in the second embodiment. FIG. 3 is a block diagram showing the configuration of the second embodiment of the present invention.

【0015】最初に本発明の第1の実施形態について説
明する。
First, a first embodiment of the present invention will be described.

【0016】図2に示すように第1の実施形態は,キー
ボード等入力装置51と,プログラムを実行する演算装
置52と,情報を記憶する記憶装置53と,ディスプレ
イ・プリンタ等出力装置と,から構成される計算機シス
テムにより実現される。
As shown in FIG. 2, the first embodiment comprises an input device 51 such as a keyboard, an arithmetic device 52 for executing a program, a storage device 53 for storing information, and an output device such as a display / printer. It is realized by a computer system configured.

【0017】図2の記憶装置53には図1のソースファ
イル修正手段1,ソース比較・記録手段2,合成ソース
生成手段3,合成オブジェクト生成手段4,修正後ロー
ドモジュール生成手段5,無条件分岐命令パッチ手段
6,ロードモジュール比較・パッチデータ生成手段7,
マスタオブジェクト生成手段14,マスタロードモジュ
ール生成手段15,が格納される。また,図1のマスタ
ソース111,修正後ソース121,関数・静的変数比
較結果格納ファイル220,合成ソース221,その他
のマスタオブジェクト103,修正前マスタオブジェク
ト113,合成ソースオブジェクト223,マスタロー
ドモジュール114,修正後ロードモジュール224,
無条件分岐命令パッチ後ロードモジュール228,パッ
チデータ1229が格納される。
In the storage device 53 of FIG. 2, the source file correcting means 1, source comparing / recording means 2, composite source generating means 3, composite object generating means 4, modified load module generating means 5, unconditional branch of FIG. Instruction patch means 6, load module comparison / patch data generation means 7,
The master object generating means 14 and the master load module generating means 15 are stored. Also, the master source 111, corrected source 121, function / static variable comparison result storage file 220, composite source 221, other master objects 103, pre-correction master object 113, composite source object 223, and master load module 114 of FIG. , Modified load module 224,
After the unconditional branch instruction patch, the load module 228 and the patch data 1229 are stored.

【0018】図1のスファイル修正手段1,ソース比較
・記録手段2,合成ソース生成手段3,合成オブジェク
ト生成手段4,修正後ロードモジュール生成手段5,無
条件分岐命令パッチ手段6,ロードモジュール比較・パ
ッチデータ生成手段7,マスタオブジェクト生成手段1
4,マスタロードモジュール生成手段15,は図2の演
算装置52上で動作する。
1, the file comparing means 1, the source comparing / recording means 2, the synthetic source generating means 3, the synthetic object generating means 4, the corrected load module generating means 5, the unconditional branch instruction patching means 6, the load module comparing.・ Patch data generation means 7, master object generation means 1
4. The master load module generating means 15 operates on the arithmetic unit 52 of FIG.

【0019】図1に示すように第一の実施形態は,ソー
スファイル修正手段1と,ソース比較・記録手段2と,
合成ソース生成手段3と,合成ソースオブジェクト生成
手段4と,修正後ロードモジュール生成手段5と,無条
件分岐命令パッチ手段6と,ロードモジュール比較・パ
ッチデータ生成手段7と,から構成される。
As shown in FIG. 1, the first embodiment comprises a source file correcting means 1, a source comparing / recording means 2,
It is composed of a synthesized source generating means 3, a synthesized source object generating means 4, a modified load module generating means 5, an unconditional branch instruction patching means 6, and a load module comparing / patch data generating means 7.

【0020】ソースファイル修正手段1は,人手により
高級言語で書かれたマスタソース111を高級言語で修
正して,修正後ソース121を生成するものであり,通
常テキストエディタが用いられる。入力は図2のキーボ
ード等入力装置51で行われる。
The source file correcting means 1 is for manually correcting the master source 111 written in a high-level language in a high-level language to generate a corrected source 121, and usually uses a text editor. The input is performed by an input device 51 such as a keyboard shown in FIG.

【0021】ソース比較・記録手段2は,マスタソース
111と修正後ソース121を比較し,関数単位に関数
の追加・変更・削除を検出し,追加・変更・削除された
関数名,追加・変更・削除の区別,マスタソース111
上の対象関数の開始行・関数終了行,修正後ソース12
1上の対象関数開始行・関数終了行,変更・追加された
静的変数等を関数・静的変数比較結果格納ファイル22
0に結果を格納する。
The source comparing / recording means 2 compares the master source 111 with the corrected source 121, detects addition / change / deletion of a function for each function, and detects the added / changed / deleted function name, addition / change .Deletion of deletion, master source 111
Start line / end line of target function above, source 12 after correction
1, the function / static variable comparison result storage file 22 stores the target function start line / function end line, changed / added static variables, etc.
Store the result in 0.

【0022】合成ソース生成手段3は,関数・静的変数
比較結果格納ファイル220を参照し,合成ソース(修
正前後の全関数を保持し,マスタソース111上の全関
数をマスタロードモジュール114と同一のアドレスに
配置し,変更後の関数・追加した関数を当該パッチレビ
ジョン用パッチコードセクション225に配置し,マス
タソース111で使用される全静的変数をマスタロード
モジュール114と同一のアドレスに配置し,修正後ソ
ース121で変更・追加された全静的変数を当該パッチ
レビジョン用追加静的変数セクション227に配置する
ソース)221を生成する。詳細は実施形態2で説明す
る。
The synthetic source generating means 3 refers to the function / static variable comparison result storage file 220, and stores the synthetic source (all functions before and after modification, and makes all functions on the master source 111 identical to the master load module 114). And the function after the change and the added function are arranged in the patch code section 225 for the patch revision, and all the static variables used in the master source 111 are arranged in the same address as the master load module 114. , A source 221 for arranging all the static variables changed and added in the modified source 121 in the additional static variable section 227 for the patch revision. Details will be described in a second embodiment.

【0023】合成ソースオブジェクト生成手段4は,合
成ソース221をコンパイルして,合成ソースオブジェ
クト223を生成するものであり,通常のコンパイラが
用いられる。
The synthesis source object generation means 4 compiles the synthesis source 221 to generate a synthesis source object 223, and a normal compiler is used.

【0024】修正後ロードモジュール生成手段5は,変
更されていないソースに対するマスタオブジェクト10
3と合成ソースオブジェクト223とをリンクし,修正
後ロードモジュール224と,修正後静的変数エリア2
26とを生成するものであり,オブジェクト単位にオブ
ジェクトファイルを指定可能なリンカが用いられる。
The modified load module generating means 5 transmits the master object 10 to the unchanged source.
3 and the synthesized source object 223, and the modified load module 224 and the modified static variable area 2
26, and a linker capable of specifying an object file for each object is used.

【0025】修正後ロードモジュール224では,修正
後ソース121で変更されなかった関数・削除された関
数・変更前の関数,すなわちマスタソース上にある全関
数が,マスタロードモジュール114のプログラムコー
ドセクション115上と同一アドレスに配置され,修正
後ソース121で変更され名称変更後の関数・追加され
た関数が当該パッチレビジョン用パッチコードセクショ
ン225に配置される。
In the post-modification load module 224, functions not changed in the post-modification source 121, deleted functions, and pre-change functions, that is, all functions on the master source, are stored in the program code section 115 of the master load module 114. The function that is located at the same address as above and that has been renamed by the source 121 after modification and that has been renamed / added function is located in the patch code section 225 for the patch revision.

【0026】すなわち,マスタロードモジュール114
と修正後ロードモジュール224との差分は,当該パッ
チレビジョン用パッチコードセクション225のみであ
る。
That is, the master load module 114
The only difference between the modified patch module 224 and the modified load module 224 is the patch code section 225 for the patch revision.

【0027】修正後静的変数エリア226では,修正後
ソース121で変更された変更前関数で使用される全静
的変数がマスタ変数エリア116のマスタ静的変数セク
ション117と同一アドレスに配置され,修正後ソース
121で変更され名称変更した関数で使用される静的変
数中,変更されなかった静的変数がマスタ変数エリア1
16のマスタ静的変数セクション117と同一アドレス
に配置され,変更された静的変数・追加された静的変数
が当該パッチレビジョン用追加静的変数セクション22
7に配置され,修正後ソース121で追加された関数で
使用される全静的変数が当該パッチレビジョン用追加静
的変数セクション227に配置される。
In the post-modification static variable area 226, all static variables used in the pre-change function changed in the post-correction source 121 are arranged at the same address as the master static variable section 117 in the master variable area 116. Among the static variables used in the functions whose names have been changed and changed in the source 121 after the correction, the static variables that have not been changed are the master variable area 1
The modified static variables and the added static variables are arranged at the same address as the 16 master static variable sections 117, and the additional static variable section 22 for the patch revision is used.
7 and all the static variables used in the function added in the source 121 after the correction are placed in the additional static variable section 227 for the patch revision.

【0028】修正後ソース121で変更された関数にお
いても変更されない静的変数がマスタ変数エリア116
のマスタ静的変数セクション117と同一アドレスに配
置されることにより,システム稼動時中にパッチが適用
される場合でも変更の無い静的変数の値を引き継ぐこと
ができる。
The static variables which are not changed even in the function changed in the source 121 after the correction are stored in the master variable area 116.
Is allocated at the same address as the master static variable section 117, the value of the static variable without change can be inherited even when a patch is applied during operation of the system.

【0029】無条件分岐命令パッチ手段6は,マスタロ
ードモジュール114と修正後ロードモジュール224
と関数・静的変数比較結果格納ファイル220とを参照
し,修正後ロードモジュール224上の変更前の関数の
先頭の命令コードを,当該パッチレビジョン用パッチコ
ードセクション225上の変更後関数の先頭への無条件
分岐命令にパッチし,無条件分岐命令パッチ後ロードモ
ジュール228を生成する。
The unconditional branch instruction patch means 6 includes a master load module 114 and a corrected load module 224.
And the function / static variable comparison result storage file 220, and transfers the instruction code at the head of the function before the change on the load module 224 after the correction to the head of the function after the change on the patch code section 225 for the patch revision. , And generates a post-patch unconditional branch instruction load module 228.

【0030】ロードモジュール比較・パッチデータ生成
手段7は,マスタロードモジュール114と無条件分岐
命令パッチ後ロードモジュール228とを比較し,差分
情報をパッチデータ1229として生成する。
The load module comparison / patch data generation means 7 compares the master load module 114 with the unconditional branch instruction post-patch load module 228, and generates difference information as patch data 1229.

【0031】以上のように本発明の第1の実施形態は,
マスタソースを人手で修正した後,マスタソースと修正
ソースとを比較し,変更後の関数・追加した関数を当該
パッチレビジョン用パッチコードセクションに配置し,
変更関数の静的変数において,変更されなかった静的変
数をマスタ静的変数エリアと同一のアドレスに配置し,
変更後の静的変数,追加した静的変数を当該パッチレビ
ジョン用追加静的変数セクションに配置し,追加された
関数において,全静的変数を当該パッチレビジョン用追
加静的変数セクションに配置するロードモジュールを生
成し,変更前関数の先頭の命令コードを,変更後関数の
先頭への無条件分岐命令にパッチした無条件分岐命令パ
ッチ後ロードモジュールと,マスタロードモジュールと
を比較し,差分情報をパッチデータとして自動生成する
ことにより,コンパイラに対して最適化されたコードに
対しても,正確で効率的にパッチデータを生成すること
ができる。
As described above, the first embodiment of the present invention comprises:
After manually modifying the master source, the master source is compared with the modified source, and the changed function / added function is placed in the patch code section for the patch revision.
In the static variables of the change function, place the static variables that have not been changed at the same address as the master static variable area,
Load the modified static variables and the added static variables in the additional static variable section for the patch revision, and place all static variables in the additional static variable section for the patch revision in the added function. A module is generated, the unconditional branch instruction in which the instruction code at the head of the pre-change function is patched to the unconditional branch instruction to the head of the post-change function is compared with the post-patch load module, and the difference information is compared. By automatically generating patch data, patch data can be generated accurately and efficiently even for code optimized for a compiler.

【0032】また,関数を追加した場合のパッチ,関数
内に静的変数を追加した場合,従来の技術では不可能あ
るいは不明確であったが,本発明はパッチデータを自動
生成することできる。
Further, in the case where a patch is added when a function is added and a case where a static variable is added in a function, it is impossible or unclear in the prior art, but the present invention can automatically generate patch data.

【0033】次に本発明の第2の実施形態について説明
する。
Next, a second embodiment of the present invention will be described.

【0034】図2に示すように,第2の実施形態は第1
の形態と同様,キーボード等入力装置51と,プログラ
ムを実行する演算装置52と,情報を記憶する記憶装置
53と,ディスプレイ・プリンタ等出力装置と,から構
成される計算機システムにより実現される。
As shown in FIG. 2, the second embodiment is the first embodiment.
As in the case of the first embodiment, the present invention is realized by a computer system including an input device 51 such as a keyboard, an arithmetic device 52 for executing a program, a storage device 53 for storing information, and an output device such as a display and a printer.

【0035】図2の記憶装置53には図3のソースファ
イル修正手段1,ソース比較・記録手段2,合成ソース
初期値設定手段31,追加・変更関数追加手段32,擬
似命令(セクション変更命令)不可手段33,静的変数
同一アドレス配置手段34,が格納される。
In the storage device 53 of FIG. 2, the source file correcting means 1, the source comparing / recording means 2, the synthesized source initial value setting means 31, the adding / changing function adding means 32, the pseudo instruction (section changing instruction) of FIG. The disabling means 33 and the static variable same address arranging means 34 are stored.

【0036】図3の合成ソース初期値設定手段31,追
加・変更関数追加手段32,擬似命令(セクション変更
命令)不可手段33,静的変数同一アドレス配置手段3
4,は図2の演算装置52上で動作する。
The synthetic source initial value setting means 31, the adding / changing function adding means 32, the pseudo instruction (section changing instruction) disabling means 33, and the static variable same address allocating means 3 shown in FIG.
4 operates on the arithmetic unit 52 of FIG.

【0037】図3に示すように第2の実施形態は,ソー
スファイル修正手段1と,ソース比較・記録手段2と,
合成ソース初期値設定手段31と,追加・変更関数追加
手段32と,擬似命令(セクション変更命令)付加手段
33と,から構成される。
As shown in FIG. 3, in the second embodiment, the source file correcting means 1, the source comparing / recording means 2,
It comprises a synthesized source initial value setting means 31, an addition / change function addition means 32, and a pseudo instruction (section change instruction) addition means 33.

【0038】ソースファイル修正手段1は,第1の形態
のソースファイル修正手段1と同一であり,説明のため
に記述した。人手により高級言語で書かれたマスタソー
ス111を高級言語で修正して,修正後ソース121を
生成するものである。
The source file modifying means 1 is the same as the source file modifying means 1 of the first embodiment, and has been described for explanation. The master source 111 written in a high-level language is manually corrected in a high-level language, and a corrected source 121 is generated.

【0039】ソース比較・記録手段2も,第1の形態の
ソース比較・記録手段2と同一であり,説明のために記
述した。マスタソース111と修正後ソース121を比
較し,関数単位に関数の追加・変更・削除を検出し,追
加・変更・削除された関数名,追加・変更・削除の種
別,マスタソース111上の対象関数の開始行・終了
行,修正後ソース121上の対象関数の開始行・終了
行,変更・追加された静的変数等を関数・静的変数比較
結果格納ファイル220に格納する。
The source comparing / recording means 2 is the same as the source comparing / recording means 2 of the first embodiment, and has been described for explanation. The master source 111 is compared with the corrected source 121 to detect addition / change / deletion of a function in function units, and the names of the added / changed / deleted functions, types of addition / change / deletion, and objects on the master source 111 The start line and end line of the function, the start line and end line of the target function on the corrected source 121, and the changed / added static variables are stored in the function / static variable comparison result storage file 220.

【0040】合成ソース初期値設定手段31は,マスタ
ソース111をコピーして,合成ソース221の初期値
を設定する。
The synthesis source initial value setting means 31 copies the master source 111 and sets the initial value of the synthesis source 221.

【0041】追加・変更関数追加手段32は,関数・静
的変数比較結果格納ファイル220を参照し,修正後ソ
ース121で変更されなかった関数・削除された関数に
対しては何も処理を行わず,修正後ソース121で変更
された関数に対しては,変更された関数の呼び出し側で
は何も処理を行わず,変更された関数の本体に関しては
コンパイルエラーとならないよう,また変更したパッチ
レビジョンが識別できるよう名称の先頭等にパッチレビ
ジョンを付加して名称変更して合成ソースに追加し,修
正後ソース121で追加された関数に対しては名称変更
を行わずに合成ソース221に追加する。結果,合成ソ
ース221はマスタソース111と修正後ソース121
において,変更前後の全関数を,変更された関数のみ重
複し,その他は1関数のみ保持する。
The addition / change function addition means 32 refers to the function / static variable comparison result storage file 220 and performs no processing on the function which has not been changed or deleted in the source 121 after the correction. In addition, for the function changed in the source 121 after the correction, the caller of the changed function does nothing, so that no compilation error occurs for the body of the changed function, and the changed patch revision In order to identify the function, a patch revision is added to the beginning of the name or the like, the name is changed, the name is added to the synthesis source, and the function added in the corrected source 121 is added to the synthesis source 221 without changing the name. . As a result, the synthesized source 221 is composed of the master source 111 and the corrected source 121.
In, all functions before and after the change are duplicated only for the changed function, and only one function is retained for the others.

【0042】擬似命令(セクション変更命令)付加手段
33は,関数・静的変数比較結果格納ファイル220を
参照し,合成ソース221に追加した関数,すなわち修
正後ソース121で追加・変更した関数のプログラムコ
ードを当該パッチレビジョン用パッチコードセクション
(図1の115)に配置する擬似命令を合成ソース22
1に付加し,修正後ソース121で変更された関数内の
変更・追加された静的変数を当該パッチレビジョン用追
加静的変数セクション(図1の227)に配置する擬似
命令を合成ソース221に付加し,追加された関数の全
静的変数を当該パッチレビジョン用パッチ追加静的変数
セクション227に配置する擬似命令を合成ソース22
1に付加する。
The pseudo instruction (section change instruction) adding means 33 refers to the function / static variable comparison result storage file 220 and adds the function added to the synthesis source 221, that is, the program of the function added or changed in the corrected source 121. A pseudo instruction for arranging the code in the patch code section for patch revision (115 in FIG. 1) is generated by the synthesis source 22.
The pseudo instruction for adding the modified / added static variable in the function changed in the source 121 after the modification to the additional static variable section for patch revision (227 in FIG. 1) is added to the synthesized source 221. A pseudo-instruction for placing all the static variables of the added function in the patch additional static variable section 227 for the patch revision is generated by the synthesis source 22.
Add to 1.

【0043】静的変数同一アドレス配置手段34は,関
数・静的変数比較結果格ファイル220を参照し,修正
後ソース121で変更された関数内の変更されない静的
変数を,マスタ変数エリア上のマスタ静的変数セクショ
ン(図1の117)と同一アドレスに配置する。
The static variable same address allocating means 34 refers to the function / static variable comparison result file 220 and stores the unchanged static variables in the function changed in the corrected source 121 in the master variable area. It is located at the same address as the master static variable section (117 in FIG. 1).

【0044】静的変数同一アドレス配置手段34によ
り,システム稼動時中にパッチが適用される場合でも変
更の無い静的変数の値を引き継ぐことができる。
By the same static variable address allocating means 34, even when a patch is applied during the operation of the system, the value of the static variable without any change can be taken over.

【0045】以上のように本発明の第2の実施形態は,
修正前後の全関数を保持し,追加・変更した関数を当該
パッチレビジョン用パッチコードセクション(図1の1
15)に配置する擬似命令を合成ソースに付加すること
により,合成ソースをコンパイル,リンクした修正後ロ
ードモジュール(図1の224)において,プログラム
コードセクション(図1の115)は,マスタロードモ
ジュール114と完全に一致し,修正後ソース121で
変更・追加された関数のコードをすべて当該パッチレビ
ジョン用パッチコードセクション(図1の225)に配
置できる。
As described above, the second embodiment of the present invention
All functions before and after correction are retained, and the added / changed functions are stored in the patch code section for the patch revision (1 in FIG. 1).
In the modified load module (224 in FIG. 1) obtained by compiling and linking the synthesized source by adding the pseudo-instruction placed in (15) to the synthesized source, the program code section (115 in FIG. And the code of the function changed / added in the source 121 after the correction can be all arranged in the patch code section for patch revision (225 in FIG. 1).

【0046】また,修正後ソース121で変更後の関数
内の変更されていない変数をマスタ変数エリア(図1の
116)上のマスタ静的変数セクション(図1の11
7)の変数と同一アドレスに配置し,変更・追加された
変数に対して当該パッチレビジョン用追加静的変数セク
ション(図1の227)に配置する擬似命令を付加し,
追加関数の全静的変数に対して当該パッチレビジョン用
追加静的変数セクション(図1の227)に配置する擬
似命令を付加することにより,パッチ前に使用していた
静的変数をそのまま使用し,変更・追加があった変数の
み当該パッチレビジョン用追加静的変数セクション(図
1の227)で使用することができる。すなわち,シス
テム稼動時中にパッチを適用しても変更の無い静的変数
の値を引き継ぐことができる。
Also, the unchanged variables in the function after the change in the corrected source 121 are stored in the master static variable section (11 in FIG. 1) in the master variable area (116 in FIG. 1).
A pseudo-instruction to be allocated at the same address as the variable in 7) and added to the changed / added variable is added to the additional static variable section for patch revision (227 in FIG. 1).
By adding a pseudo instruction to be placed in the additional static variable section for patch revision (227 in FIG. 1) to all static variables of the additional function, the static variables used before the patch can be used as they are. Only the changed / added variables can be used in the additional static variable section for patch revision (227 in FIG. 1). That is, the value of a static variable that does not change even when a patch is applied during operation of the system can be inherited.

【0047】[0047]

【発明の効果】以上説明したように,本発明によれば,
高級言語で記述したマスタソースファイルと,高級言語
で修正した修正後のソースファイルからパッチデータを
自動生成するため,高級言語でソース修正しリンクを取
り直して全面修正(バージョンアップ)する場合と同一
の生産性と同一の品質を提供することができる。
As described above, according to the present invention,
To automatically generate patch data from the master source file described in the high-level language and the corrected source file corrected in the high-level language, the same as when the source is corrected in the high-level language and the link is redone to completely correct (version upgrade) The same quality as productivity can be provided.

【0048】その理由は,従来人手によりアセンブラ言
語で作成していたパッチデータを,本発明の装置が高級
言語で記述したソースファイルから自動的に生成するも
のであるからである。アセンブラ言語によるパッチは,
スタック操作を誤る等バグが入り込む頻度が高い。コン
パイラの最適化技術の発達によりソフトウェア開発者が
意図しないCPUの命令の実行順序とは異なる命令実行
順序をコンパイラが生成した場合は,非常に困難であっ
たパッチが自動的に生成できるためである。
The reason is that the patch data which has conventionally been manually created in the assembler language is automatically generated from the source file described in the high-level language by the apparatus of the present invention. Patches in assembler language are:
Frequent bugs such as incorrect stack operation. This is because if the compiler generates an instruction execution order that is different from the CPU execution order that is not intended by the software developer due to the development of compiler optimization technology, a very difficult patch can be automatically generated. .

【0049】また,本発明によれば,関数が追加された
場合も正確なパッチを生成することができる。
According to the present invention, an accurate patch can be generated even when a function is added.

【0050】更に,本発明によれば,静的変数が追加に
なった場合も正確なパッチを生成することができる。
Further, according to the present invention, an accurate patch can be generated even when a static variable is added.

【0051】その理由は,関数が追加された場合も当該
関数のプログラムコードを当該パッチレビジョン用パッ
チコードセクションに生成し,静的変数が追加になった
場合も,各パッチレビジョン用追加静的変数セクション
に追加するためである。
The reason is that when a function is added, the program code of the function is generated in the patch code section for the patch revision, and when a static variable is added, the additional static variable for each patch revision is also generated. This is to add it to the section.

【0052】更にまた,本発明によれば,システム稼動
時中にパッチを適用することができる。
Further, according to the present invention, a patch can be applied while the system is operating.

【0053】その理由は,関数が変更された場合でも,
変更の無い静的変数は,マスタの静的変数と同一なアド
レスに配置されるからである。
The reason is that even if the function is changed,
This is because a static variable that has not been changed is located at the same address as the static variable of the master.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本発明の第1の実施形態を表すブロック図で
ある。
FIG. 1 is a block diagram illustrating a first embodiment of the present invention.

【図2】 本発明の第1・第2の実施形態前提とするハ
ードウェア環境を示すブロック図である。
FIG. 2 is a block diagram illustrating a hardware environment based on the first and second embodiments of the present invention.

【図3】 本発明の第2の実施形態を表すブロック図で
ある。
FIG. 3 is a block diagram illustrating a second embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 ソースファイル修正手段 2 ソース比較・記録手段 3 合成ソース生成手段 4 合成ソースオブジェクト生成手段 5 修正後ロードモジュール生成手段 6 無条件分岐命令パッチ手段 7 ロードモジュール比較・パッチデータ生成手段 14 マスタオブジェクト生成手段 15 マスタロードモジュール生成手段 103 その他マスタオブジェクト 111 マスタソース 113 修正前マスタオブジェクト 114 マスタロードモジュール 115 プログラムコードセクション 116 マスタ静的変数エリア 117 マスタ静的変数セクション 121 修正後ソース 220 関数・静的変数比較結果格納ファイル 221 合成ソース 223 合成ソースオブジェクト 224 修正後ロードモジュール 225 当該パッチレビジョン用パッチコードセクショ
ン 226 修正後静的変数エリア 227 当該パッチレビジョン用追加静的変数セクショ
ン 228 無条件分岐命令パッチ後ロードモジュール 1229 パッチデータ 51 入力装置 52 演算装置 53 記憶装置 54 出力装置 31 合成ソース初期値設定手段 32 追加・変更関数追加手段 33 擬似命令(セクション変更命令)付加手段 静的変数同一アドレス配置手段
DESCRIPTION OF SYMBOLS 1 Source file correction means 2 Source comparison and recording means 3 Synthetic source generation means 4 Synthetic source object generation means 5 Modified load module generation means 6 Unconditional branch instruction patch means 7 Load module comparison and patch data generation means 14 Master object generation means 15 Master load module generating means 103 Other master object 111 Master source 113 Master object before correction 114 Master load module 115 Program code section 116 Master static variable area 117 Master static variable section 121 Source after correction 220 Function / static variable comparison result Storage file 221 Synthetic source 223 Synthetic source object 224 Modified load module 225 Patch code section for the patch revision 226 Modified static variable area 227 Additional static variable section for the patch revision 228 Unconditional branch instruction post-patch load module 1229 Patch data 51 Input device 52 Arithmetic device 53 Storage device 54 Output device 31 Synthetic source initial value setting means 32 Addition -Change function adding means 33 Pseudo instruction (section change instruction) adding means Static variable same address allocating means

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】マスタソースファイル中のソースプログラ
ム(以下マスタソース)を修正(修正後のソースを以下
修正ソース)する手段1と,マスタソースと修正ソース
とを比較して追加・変更・削除された関数の情報(関数
名・比較結果・関数開始行・関数終了行,静的変数の比
較結果その他)をファイル(以下関数・静的変数比較結
果格納ファイル)に記録する手段2と,前記の関数・静
的変数比較結果格納ファイルを参照し,合成ソース(修
正前後の全関数を保持し,マスタソース上の全関数をマ
スタロードモジュールと同一のアドレスに配置し,変更
後の関数・追加した関数を当該パッチレビジョン用パッ
チコードセクションに配置し,マスタソースで使用され
る全静的変数をマスタロードモジュールと同一のアドレ
スに配置し,変更・追加された全静的変数を当該パッチ
レビジョン用追加静的変数セクションに配置するソー
ス)を生成する手段3と,合成ソースをコンパイルし
て,オブジェクト(以下合成ソースオブジェクト)を生
成する手段4と変更されていないソースに対するマスタ
オブジェクトと合成ソースオブジェクトとをリンクし,
ロードモジュール(以下,修正後ロードモジュール)と
静的変数エリア(以下,修正後静的変数エリア)を生成
する手段5と,修正後ロードモジュール上の変更前関数
の先頭の命令コードを,変更後関数の先頭への無条件分
岐命令にパッチ(パッチ後のロードモジュールを以下,
無条件分岐命令パッチ後ロードモジュール)する手段6
と,マスタロードモジュールと無条件分岐命令パッチ後
ロードモジュールとを比較し,差分情報,すなわち,当
該パッチレビジョン用パッチコードセクション(修正ソ
ースで変更し名称変更した関数・追加した関数が配置さ
れている)と,無条件分岐命令(変更前関数の先頭の命
令コードが変更後関数の先頭への無条件分岐命令にパッ
チされている)をパッチデータとする手段7と,を備え
ることを特徴とするパッチ自動生成装置。
1. A means 1 for modifying a source program (hereinafter, a master source) in a master source file (hereinafter, a modified source is hereinafter referred to as a modified source), and comparing the master source with the modified source to add / change / delete the source program. Means 2 for recording function information (function name, comparison result, function start line, function end line, comparison result of static variables, etc.) in a file (hereinafter referred to as function / static variable comparison result storage file); By referring to the function / static variable comparison result storage file, the synthesis source (all functions before and after modification are retained, all functions on the master source are located at the same address as the master load module, and the modified functions and added Place the function in the patch code section for the patch revision, place all static variables used in the master source at the same address as the master load module, and change A means 3 for generating a source for arranging all the added static variables in the additional static variable section for the patch revision, and a means 4 for compiling a synthesized source to generate an object (hereinafter referred to as a synthesized source object) Link the master object and the composite source object for the source that is not
Means 5 for generating a load module (hereinafter, a post-modification load module) and a static variable area (hereinafter, a post-modification static variable area); Patch the unconditional branch instruction to the beginning of the function.
Means 6 to load module after unconditional branch instruction patch)
Is compared with the master load module and the unconditional branch instruction after-patch load module, and the difference information, that is, the patch code section for the patch revision (functions whose names have been changed and added by the correction source and added functions are located) And an unconditional branch instruction (an instruction code at the head of the function before change is patched to an unconditional branch instruction to the head of the function after change) as patch data. Automatic patch generation device.
【請求項2】前記の手段3を実現するため,マスタソー
スをコピーして合成ソースの初期値を生成する手段31
と,前記の関数・静的変数比較結果格納ファイルを参照
し,変更されなかった関数・削除された関数に対しては
何も処理を行わず,修正後ソースで変更された関数に対
しては変更された関数の呼び出し側に対しては何も処理
を行わず,関数の本体に関しては名称の先頭等にパッチ
レビジョンを付加して名称変更して合成ソースに追加
し,修正後ソースで追加された関数に対しては名称変更
を行わず合成ソースに追加する手段32と,合成ソース
に追加した関数(すなわち修正後ソースで変更された関
数・追加された関数)のプログラムコードを当該パッチ
レビジョン用パッチコードセクションに配置するための
擬似命令を合成ソースに付加し,変更後関数で使用され
る静的変数中,変更された静的変数・追加された静的変
数を当該パッチレビジョン用追加静的変数セクションに
配置する擬似命令を合成ソースに付加し,追加関数で使
用される全静的変数を当該パッチレビジョン用追加静的
変数セクションに配置する擬似命令を合成ソースに付加
する手段33と,変更後関数で使用される静的変数中,
変更されない静的変数をマスタ変数エリア上のマスタ静
的変数セクションの変数と同一アドレスに配置する手段
34と,を備えることを特徴とする請求項1記載のパッ
チ自動生成装置。
2. A means for copying a master source to generate an initial value of a synthesized source for realizing the means 3.
And refer to the above function / static variable comparison result storage file, perform no processing for functions that have not been changed / deleted, and have no effect on functions that have been changed in the source after modification. No processing is performed on the caller of the changed function. For the function body, the patch revision is added to the beginning of the name, the name is changed, the name is added to the composite source, and the modified source is added in the source. Means 32 for adding the function to the synthesized source without changing the name, and the program code of the function added to the synthesized source (that is, the function changed in the source after correction / added function) for the patch revision. Pseudo-instructions to be placed in the patch code section are added to the synthesized source, and among the static variables used in the changed function, the changed static variables / added static variables are added to the patch revision. A pseudo-instruction to be placed in the additional static variable section for the revision is added to the synthesis source, and a pseudo-instruction to place all the static variables used in the additional function in the additional static variable section for the patch revision is added to the synthesis source. Means 33 and static variables used in the post-change function,
2. The automatic patch generation device according to claim 1, further comprising means for allocating static variables that are not changed at the same addresses as the variables of the master static variable section in the master variable area.
JP11138244A 1999-05-19 1999-05-19 Software patch data automatic generation device Pending JP2000330780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11138244A JP2000330780A (en) 1999-05-19 1999-05-19 Software patch data automatic generation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11138244A JP2000330780A (en) 1999-05-19 1999-05-19 Software patch data automatic generation device

Publications (1)

Publication Number Publication Date
JP2000330780A true JP2000330780A (en) 2000-11-30

Family

ID=15217451

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11138244A Pending JP2000330780A (en) 1999-05-19 1999-05-19 Software patch data automatic generation device

Country Status (1)

Country Link
JP (1) JP2000330780A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100465895C (en) * 2004-09-22 2009-03-04 松下电器产业株式会社 Compiler, compilation method, and compilation program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100465895C (en) * 2004-09-22 2009-03-04 松下电器产业株式会社 Compiler, compilation method, and compilation program

Similar Documents

Publication Publication Date Title
US5561800A (en) Method and apparatus for incrementally linking modified routines into software
US8261247B2 (en) Method of modifying code of a running computer program based on symbol values discovered from comparison of running code to corresponding object code
US8607208B1 (en) System and methods for object code hot updates
US6795963B1 (en) Method and system for optimizing systems with enhanced debugging information
EP0752647B1 (en) Method and apparatus for internal versioning of objects using a map file
US6594822B1 (en) Method and apparatus for creating a software patch by comparing object files
US5313387A (en) Re-execution of edit-compile-run cycles for changed lines of source code, with storage of associated data in buffers
US8117589B2 (en) Metadata driven API development
US5204960A (en) Incremental compiler
US5170465A (en) Incremental-scanning compiler for source-code development system
JP2000181725A (en) Method and system for altering executable code and giving addition function
US7971201B2 (en) Multiple operating device version software generating system and multiple operating device version software generation support program and method
US20120246618A1 (en) Method and a system for generating a software product
CN113849181B (en) Cross-compilation tool chain construction method, device, electronic device and storage medium
US20100095282A1 (en) Method, Apparatus And Computer Program Product For Creating Inter-Language Interface
US6886156B2 (en) Disassembling object code
US20050039196A1 (en) Method and system for using a library
US5301327A (en) Virtual memory management for source-code development system
CN111400256A (en) Method and device for calling resource file by application program
JP2000330780A (en) Software patch data automatic generation device
JP4484001B2 (en) Library function version matching method.
GB2342200A (en) Initializing global registers
CN116009959B (en) Flash item transplanting method, device and system and storage medium
US7861236B2 (en) System and method for version control for software development
JP2907129B2 (en) Patch creation system