JPS6224323A - Link system - Google Patents

Link system

Info

Publication number
JPS6224323A
JPS6224323A JP60163187A JP16318785A JPS6224323A JP S6224323 A JPS6224323 A JP S6224323A JP 60163187 A JP60163187 A JP 60163187A JP 16318785 A JP16318785 A JP 16318785A JP S6224323 A JPS6224323 A JP S6224323A
Authority
JP
Japan
Prior art keywords
module
program
instruction
library
same function
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
JP60163187A
Other languages
Japanese (ja)
Inventor
Shunichi Kato
俊一 加藤
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP60163187A priority Critical patent/JPS6224323A/en
Publication of JPS6224323A publication Critical patent/JPS6224323A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To recover an abnormal end to continue a program by producing a load module so as to execute again a module having the same function and stored in another library in case an instruction is received to give an abnormal end to the program. CONSTITUTION:A linker 3 detects a CALL-ABORT instruction out of a loaded library 1 and loads a module 201 having the same function as a module 502 including the CALL-ABORT instruction through another library 2. Then this instruction is replaced with a branch instruction to the entrance address of a module 503 loaded later. Thus a load module is produced so as to execute again the module having the same function and stored in another library in case an instruction is received to give an abnormal end to a program. Therefore a module can be executed again before revision when the program has an abnormal end state owing to the bug mixed by the revision in case the libraries 1 and 2 are defines as those set after and before revision of the program respectively.

Description

【発明の詳細な説明】 技術分野 本発明はリンク方式に関し、特に実行形式プログラム(
以下ロードモジュールと称す)を作成するリンク方式に
関する。
[Detailed Description of the Invention] Technical Field The present invention relates to a linking method, and particularly to an executable program (
This invention relates to a linking method for creating a load module (hereinafter referred to as a load module).

従来技術 従来、この種のリンク方式は、第4図に示す如くリンク
指定4にてリンク指定されたオブジェクトモジュールA
、B (101,102)をオブジェクトライブラリ1
からロードして、このロードされたオブジェクトモジュ
ール(501,502)中にプログラムを異常終了させ
る命令(第4図の例では“CALL ABOIIT”)
があった場合、O8(オペレーティングシステム)の異
常終了処理ルーチンへの分岐命令(第4図の例では’ 
BRANCII(abt)”)へ変更する処理を行って
いる。
PRIOR ART Conventionally, this type of linking method has been used to link an object module A specified by link specification 4 as shown in FIG.
, B (101, 102) in object library 1
An instruction (“CALL ABOIIT” in the example of FIG. 4) that loads the program from the loaded object module (501, 502) and causes the program to terminate abnormally.
If there is a branch instruction to the abnormal termination processing routine of O8 (operating system) ('
BRANCII(abt)'').

尚、図−において、3はリンカ一本体であり、5はロー
ドモジュールライブラリを示している。
In the figure, 3 is the main body of the linker, and 5 is the load module library.

かかる従来のリンカ−によるリンク方式は、プログラム
に異常が生じた場合、直接O8の異常処理ルーチンに制
御が渡ってしまうために、プログラム自体の異常回復が
行えないばかりかプログラムの続行が行えないという欠
点がある。
In the conventional linking method using a linker, when an abnormality occurs in a program, control is passed directly to the abnormality handling routine of O8, which not only makes it impossible to recover from the abnormality of the program itself, but also prevents the program from continuing. There are drawbacks.

R1」↑目□的 本発明は、プログラムを異常終了させる命令があった場
合、この異常終了を回復せしめてプログラムの続行を可
能としたリンク方式を提供することを目的としている。
An object of the present invention is to provide a linking method that, when there is an instruction to abnormally terminate a program, can recover from the abnormal termination and allow the program to continue.

発明の構成 本発明によるリンク方式では、個別にコンパイルされた
オブジェクトモジュールを結合してロードモジュールを
作成するようにしたリンク方式であって、同一機能のオ
ブジェクトモジュールを含む少なくとも2つのライブラ
リと、このライブラリの1つからロードしたオブジェク
トモジュールの中にプログラムを異常終了させる命令の
存在を検出して他のライブラリから同一機能のオブジェ
クトモジュールをロードする手段とを設け、前記異常終
了させる命令を後からロードしたモジュールの入口番地
への分岐命令に変更するようにしたことを特徴としてい
る。
Structure of the Invention The linking method according to the present invention is a linking method in which separately compiled object modules are combined to create a load module, and the linking method combines at least two libraries containing object modules with the same function, and this library. means for detecting the presence of an instruction for abnormally terminating a program in an object module loaded from one of the libraries, and loading an object module having the same function from another library, and later loading the instruction for abnormally terminating the program. The feature is that the branch instruction is changed to the module entry address.

実施例 以下、図面を用いて本発明の実施例につき説明する。Example Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明の実施例の機能的ブロック図であり、全
体を制御するメインルーチン11.リンク指定読み込み
ルーチン12.オブジェクトライ、ブラリ1の読み込み
ルーチン13.他のオブジェクトライブラリ2の読み込
みルーチン14.モジュール間の参照関係に用いるリン
ケージシンボルを貯えるリンケージシンボル保有ルーチ
ン15゜リンケージシンボルの参照を実アドレスに変換
することにより解決するリンケージシンボルサーチルー
チン16.“CALL ABORT”命令を見つけ出す
”CALL ABORT”判定ルーチン17.相対番地
としてコンパイルされている各命令を絶対アドレスに変
換するアドレスリロケーションルーチン18゜O−トモ
ジュール書き込みルーチン19からなる。
FIG. 1 is a functional block diagram of an embodiment of the present invention, in which a main routine 11. Link specification reading routine 12. Object library, Library 1 reading routine 13. Other object library 2 loading routine 14. 15. Linkage symbol holding routine that stores linkage symbols used for reference relationships between modules; 15. Linkage symbol search routine that resolves linkage symbol references by converting them into real addresses; 16. “CALL ABORT” determination routine to find “CALL ABORT” command 17. It consists of an address relocation routine 18 which converts each instruction compiled as a relative address into an absolute address, and an output module write routine 19.

第2因は第1図のブロックによるリンカ−の処理機能を
第4図の場合と同様に対応して示した模式図であり、第
1図と同等部分は同一符号により示している。オブジェ
クトライブラリ1はオブジェクトモジュールA、B (
101,102)からなり、リンクされるモジュールが
最初に選択されるライブラリである。オブジェクトライ
ブラリ2は同一機能(同一名)のモジュールB’  (
201)が゛2度目に選択されるライブラリである。リ
ンクの結果はロードモジュールライブラリ5内に一つの
モジュール(501〜503)として置かれるものであ
る。
The second factor is a schematic diagram showing the processing functions of the linker using the blocks in FIG. 1 in a manner similar to that in FIG. 4, and parts equivalent to those in FIG. 1 are designated by the same reference numerals. Object library 1 contains object modules A and B (
101, 102), and is the library from which the module to be linked is first selected. Object library 2 has the same function (same name) module B' (
201) is the library selected for the second time. The link result is placed in the load module library 5 as one module (501 to 503).

第3図は第1,2図の実施例の動作フロー図であり、“
CALL ABORT”命令の検出(第1図のルーチン
17)とそれに対する処理に特徴を有するものである。
FIG. 3 is an operational flow diagram of the embodiment shown in FIGS.
This routine is characterized by the detection of the "CALL ABORT" command (routine 17 in FIG. 1) and the processing therefor.

すなわち、プログラム作成者は通常プログラムの異常に
当る部分に対してO8の異常処理ルーチンに制御を渡す
いわゆる“CALL ABORT”命令を置く。そこで
、本発明によるリンク方式では、ロードされている1つ
のライブラリ1においてこの’CALL ABORT”
命令が検出されると、その”CALL ABORT”命
令を含むモジュール502と同一機能のモジュール20
1を他のライブラリ2からロードし、先に検出されたC
ALL^BORT”命令を後からロードしたモジュール
503の入口番地への分岐命令に置き換えるものである
That is, the program creator normally places a so-called "CALL ABORT" command for passing control to the abnormality processing routine of O8 in the part of the program that corresponds to the abnormality. Therefore, in the linking method according to the present invention, in one loaded library 1, this 'CALL ABORT'
When a command is detected, a module 20 having the same function as the module 502 containing the "CALL ABORT" command
1 from another library 2, and the previously detected C
ALL^BORT'' instruction is replaced with a branch instruction to the entrance address of the module 503 loaded later.

こうすることにより、プロゲラを異常終了させる命令が
あった場合、他のライブラリ中の同−機能のモジュール
をもう一度実行するようにロードモジュールが作成され
る。したがって、例えば第一のライブラリ1をプログラ
ム改版後のライブラリとし、第二のライブラリ2をプロ
グラム改版前のライブラリとした場合、プログラム改版
により混入されたバグの為プログラムが異常終了する状
態になった時に、プログラム改版前のモジュールを再実
行できるようになるのである。
By doing this, when there is an instruction to abnormally terminate Progera, a load module is created so that a module with the same function in another library is executed again. Therefore, for example, if the first library 1 is the library after the program revision and the second library 2 is the library before the program revision, when the program ends abnormally due to a bug introduced by the program revision, , it becomes possible to re-execute the module from before the program was revised.

発明の効果 叙上の如く、本発明によれば、プログラムを異常終了さ
せる命令があった場合、他のライブラリ中の同一機能モ
ジュールを再度実行させるようにO−トモジュールを生
成するものであるから、プログラムの異常終了を回復せ
しめてプログラムの続行を可能とし得るという効果があ
る。
Effects of the Invention As described above, according to the present invention, when there is an instruction to abnormally terminate a program, an O-to module is generated so that the same functional module in another library is executed again. This has the effect of recovering from abnormal program termination and allowing the program to continue.

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

第1図は本発明の実施例によるリンカ−の機能的ブロッ
ク図、第2図は第1図のリンカ−の処理機能を模式的に
示した図、第3図は本発明の実施例の動作フロー図、第
4図は従来のリンカ−の処理機能を模式的に示した図で
ある。 主要部分の符号の説明 1.2・・・・・・オブジェクトライブラリ3・・・・
・・リンカ−
FIG. 1 is a functional block diagram of a linker according to an embodiment of the present invention, FIG. 2 is a diagram schematically showing the processing functions of the linker in FIG. 1, and FIG. 3 is an operation of an embodiment of the present invention. The flowchart, FIG. 4, is a diagram schematically showing the processing functions of a conventional linker. Explanation of codes of main parts 1.2...Object library 3...
・・Linker

Claims (1)

【特許請求の範囲】[Claims] 個別にコンパイルされたオブジェクトモジュールを結合
してロードモジュールを作成するようにしたリンク方式
であって、同一機能のオブジェクトモジュールを含む少
なくとも2つのライブラリと、このライブラリの1つか
らロードしたオブジェクトモジュールの中にプログラム
を異常終了させる命令の存在を検出して他のライブラリ
から同一機能のオブジェクトモジュールをロードする手
段とを設け、前記異常終了させる命令を後からロードし
たモジュールの入口番地への分岐命令に変更するように
したことを特徴とするリンク方式。
A linking method that creates a load module by combining separately compiled object modules, the linking method comprising at least two libraries containing object modules with the same functionality and an object module loaded from one of the libraries. means for detecting the presence of an instruction that causes the program to terminate abnormally and loading an object module with the same function from another library, and changing the instruction that causes the abnormal termination to a branch instruction to the entrance address of the module that is subsequently loaded. A link method characterized by the following.
JP60163187A 1985-07-24 1985-07-24 Link system Pending JPS6224323A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60163187A JPS6224323A (en) 1985-07-24 1985-07-24 Link system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60163187A JPS6224323A (en) 1985-07-24 1985-07-24 Link system

Publications (1)

Publication Number Publication Date
JPS6224323A true JPS6224323A (en) 1987-02-02

Family

ID=15768913

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60163187A Pending JPS6224323A (en) 1985-07-24 1985-07-24 Link system

Country Status (1)

Country Link
JP (1) JPS6224323A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61155130A (en) * 1984-12-27 1986-07-14 Sumitomo Heavy Ind Ltd Tip stowage device in shipping machine

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61155130A (en) * 1984-12-27 1986-07-14 Sumitomo Heavy Ind Ltd Tip stowage device in shipping machine

Similar Documents

Publication Publication Date Title
JP3407809B2 (en) Automated test system for computer application software
US6003095A (en) Apparatus and method for demand loading a dynamic link library
JPH07230386A (en) Data processor and method for calling control routine
JPS6224323A (en) Link system
KR900006667B1 (en) Program assembling system
US5740446A (en) Compiling device and compiling method
JPH0554277A (en) Plant monitor device
JPS6175435A (en) Association system between syntax checker and text editor
JP2005174045A (en) Source program conversion device, source program conversion method, source program conversion program and program recording medium
JPH09282174A (en) Program execution method
JPH05334119A (en) Method for debugging program
US6104873A (en) Use of language instructions and functions across multiple processing sub-environments
JPH01205332A (en) Linkage editor system
JPH03278232A (en) Exclusive control system for non-reentrant structure subroutine
JPH0233173B2 (en)
JPH0447337B2 (en)
JPH01205348A (en) Program debugging system
JPS5833737A (en) Reset controlling system
JP2001134431A (en) Method for deciding reinput possibility of function
JPH1124939A (en) Program conversion method
JPH0695869A (en) Input and output interface information capturing system for dynamic link library program
JPH06119203A (en) Debugging line deleting device
JPH0311425A (en) Preventing system for omission of compiling after correction of program
JPS61223952A (en) Retry function confirming system of data processor
JPS61156339A (en) Trace processing system