JP2621898B2 - Dynamic resolution processing method of external reference type address constant - Google Patents

Dynamic resolution processing method of external reference type address constant

Info

Publication number
JP2621898B2
JP2621898B2 JP63009107A JP910788A JP2621898B2 JP 2621898 B2 JP2621898 B2 JP 2621898B2 JP 63009107 A JP63009107 A JP 63009107A JP 910788 A JP910788 A JP 910788A JP 2621898 B2 JP2621898 B2 JP 2621898B2
Authority
JP
Japan
Prior art keywords
program
address
type address
address constant
constant
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.)
Expired - Fee Related
Application number
JP63009107A
Other languages
Japanese (ja)
Other versions
JPH01184531A (en
Inventor
孝則 寺田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP63009107A priority Critical patent/JP2621898B2/en
Publication of JPH01184531A publication Critical patent/JPH01184531A/en
Application granted granted Critical
Publication of JP2621898B2 publication Critical patent/JP2621898B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Description

【発明の詳細な説明】 〔概要〕 各々独立に作成されたプログラムを,実行時に動的に
結合させて動作させる処理機能を有するデータ処理シス
テムにおける外部参照型アドレス定数の動的解決処理法
式に関し, 静的に結合されていない他のプログラムのアドレスだ
けを参照できるようにすることを目的とし, 少なくとも,未解決である分岐型アドレス定数を解決
すると共に,外部プログラムのアドレスを参照する未解
決の参照型アドレス定数がある場合にその外部プログラ
ムをローディングし該参照型アドレス定数を解決する処
理手段を有する実行管理部と,動的に解決されるべき分
岐型および参照型のアドレス定数に対応して,各エント
リに,他の外部プログラムへの分岐時に制御が渡されて
前記実行管理部へ制御を移行する命令と外部プログラム
情報とを持つリンク制御テーブルとを備え,各プログラ
ムの動的結合要求時に,前記リンク制御テーブルを介し
て前記実行管理部を起動し,結合されるプログラムに係
る外部プログラムの参照型アドレス定数を解決するよう
に構成する。
DETAILED DESCRIPTION OF THE INVENTION [Summary] The present invention relates to a method for dynamically resolving an external reference type address constant in a data processing system having a processing function of dynamically combining independently created programs at the time of execution. An unresolved reference that resolves at least the unresolved branch-type address constant and that refers to the address of an external program, so that it can refer only to the address of another program that is not statically bound. An execution management unit having a processing means for loading an external program when there is a type address constant and resolving the reference type address constant, and a branch type and reference type address constant to be dynamically resolved, Control is passed to each entry at the time of branching to another external program, and an instruction for transferring control to the execution management unit and an external program. And a link control table having program information. When a dynamic connection request of each program is requested, the execution management unit is started via the link control table, and a reference type address constant of an external program related to the program to be connected is stored. Configure to resolve.

〔産業上の利用分野〕[Industrial applications]

本発明は,各々独立に作成されたプログラムを,実行
時に動的に結合されて動作させる処理機能を有するデー
タ処理システムにおける外部参照型アドレス定数の動的
解決処理方式に関する。
The present invention relates to a method for dynamically resolving an external reference type address constant in a data processing system having a processing function of dynamically combining and operating independently created programs at the time of execution.

〔従来技術とその問題点〕[Conventional technology and its problems]

各々独立に作成されたプログラムを,結合させる場
合,いわゆるリンカ(リンケージエディタ)によって,
あらかじめ静的に結合させて,1つのロードモジュールと
する方式と,各プログラムを別個のロードモジュールと
して用意し,実行時に動的に結合させる動的リンク方式
とが用いられている。
When combining independently created programs, a so-called linker (linkage editor)
A method in which one load module is statically combined in advance and a dynamic link method in which each program is prepared as a separate load module and dynamically combined at the time of execution are used.

動的リンク方式を採ると,個々のプログラムを独立に
作成し,そのどれかのプログラムを変更・修正などした
場合に,他のプログラムに影響を与えることがなく,静
的リンクの処理をやり直す必要がないというメリットが
ある。
With the dynamic link method, each program must be created independently, and if any of the programs is changed or modified, it is necessary to redo the static link processing without affecting other programs. There is a merit that there is no.

しかし,従来の動的リンク方式によれば,あるプログ
ラムから他のプログラムを呼び出す場合,すなわち,分
岐して他のプログラムへ制御を移行する場合には,動的
リンクを使用することができるが,単に他のプログラム
のアドレスだけを参照する場合には,動的リンクを使用
することができず,従って,そのような場合には,必ず
静的リンクにより,あらかじめモジュールを結合してお
かなければならなかった。
However, according to the conventional dynamic link method, when one program calls another program, that is, when control is transferred to another program by branching, dynamic link can be used. If only the address of another program is referred to, dynamic linking cannot be used. Therefore, in such a case, the modules must be linked by static linking in advance. Did not.

本発明は上記問題点の解決を図り,静的に結合されて
いない他のプログラムのアドレスだけを,実行時による
結合によって参照可能とする手段を提供することを目的
としている。
SUMMARY OF THE INVENTION It is an object of the present invention to solve the above-mentioned problems and to provide means for making it possible to refer only to the address of another program that is not statically linked by execution-time linking.

〔問題点を解決するための手段〕[Means for solving the problem]

第1図は本発明の原理説明図を示す。 FIG. 1 is a diagram illustrating the principle of the present invention.

第1図において,10は実行管理部,11は分岐型アドレス
定数解決処理部,12は参照型アドレス定数解決処理部,13
はリンク制御テーブル,14はオペレーティング・システ
ム(OS),15はプログラムをメモリヘローディングする
ローダ,16は外部記憶装置上のロードモジュール,20Aな
いし20Cはそれぞれ個別のロード単位となっているプロ
グラム,21Aないし21Cは動的リンク用のテーブル(DALTA
B)を表す。
In FIG. 1, 10 is an execution management unit, 11 is a branch type address constant resolution processing unit, 12 is a reference type address constant resolution processing unit, 13
Is a link control table, 14 is an operating system (OS), 15 is a loader for loading a program into a memory, 16 is a load module on an external storage device, 20A to 20C are programs that are individual load units, 21A Or 21C is a dynamic link table (DALTA
B).

本発明では,個別のロードモジュールとして作成され
たプログラム間の分岐型アドレス定数の解決および参照
型アドレス定数の解決のために,実行管理部10が設けら
れる。実行管理吹10は,分岐型アドレス定数解決処理部
11と参照型アドレス定数解決処理部12とを有しており,
分岐型アドレス定数解決処理部11は,未解決である分岐
型アドレス定数による分岐先となるプログラムをローデ
ィングし結合する処理を行う。参照型アドレス定数解決
処理部12は,ローディングしたプログラム内に外部プロ
グラムのアドレスを参照する未解決の参照型アドレス定
数がある場合に,その外部プログラムをローディング
し,参照型アドレス定数を解決する処理を行う。
In the present invention, the execution management unit 10 is provided for resolving a branch type address constant and a reference type address constant between programs created as individual load modules. Execution management 10 is a branch-type address constant resolution processing unit.
11 and a reference-type address constant resolution processor 12.
The branch-type address constant resolution processing unit 11 performs a process of loading and combining a program to be branched to by an unresolved branch-type address constant. If there is an unresolved reference type address constant that refers to the address of the external program in the loaded program, the reference type address constant resolution processing unit 12 performs processing for loading the external program and resolving the reference type address constant. Do.

リンク制御テーブル13は,実行管理部10がプログラム
の動的リンクのために使用する制御テーブルであって,
その各エントリが,動的に解決されるべき分岐型および
参照型のアドレス定数に対応するようになっている。リ
ンク制御テーブル13の各エントリは,分岐型アドレス定
数による他のプログラムへの分岐時に制御が渡されて,
実行管理部10へ制御を移行する命令列を持ち,また分岐
型または参照型のアドレス定数に関する外部プログラム
情報を持つ。
The link control table 13 is a control table used by the execution management unit 10 for dynamic linking of programs.
Each entry corresponds to a branch type and reference type address constant to be dynamically resolved. Control is passed to each entry of the link control table 13 when branching to another program by a branch address constant.
It has an instruction sequence for transferring control to the execution management unit 10, and has external program information related to a branch type or reference type address constant.

例えばプログラム20Aから他のプログラム20Bへ分岐す
る場合,従来技術では,DALTAB21A中のリンケージエント
リから,オペレーティング・システム14のローダ15を呼
び出し,動的リンクを実行して,分岐するようにしてい
た。
For example, when branching from the program 20A to another program 20B, in the prior art, the loader 15 of the operating system 14 is called from the linkage entry in the DALTAB 21A, and a dynamic link is executed to branch.

これに対し,本発明では,リンク制御テーブル13を介
して実行管理部10が呼び出される。実行管理部10は,分
岐型アドレス定数解決処理部11により,従来と同様なプ
ログラム20Bの動的リンクを行い,さらに参照型アドレ
ス定数解決処理部12により,プログラム20Bが他のプロ
グラム20C内を参照するとき,その参照型アドレス定数
を,事前にプログラム20Cをローディングすることによ
って解決する。
On the other hand, in the present invention, the execution management unit 10 is called via the link control table 13. The execution management unit 10 uses the branch-type address constant resolution processing unit 11 to dynamically link the program 20B as before, and the reference-type address constant resolution processing unit 12 allows the program 20B to refer to the inside of another program 20C. When doing so, the reference type address constant is solved by loading the program 20C in advance.

〔作用〕[Action]

第1図に従って,本発明の動作を説明すると以下のと
おりである。
The operation of the present invention will be described below with reference to FIG.

実行管理部10は,最初にリンク制御テーブル13をロ
ーディングする。
The execution management unit 10 loads the link control table 13 first.

〜 例えば,プログラム20Aの実行が進み,他のプ
ログラム20Bへ分岐する命令が実行されると,V形式アド
レス定数が持つアドレスへの分岐により,リンク制御テ
ーブル13における該当エントリの先頭に制御が渡る。
For example, when the execution of the program 20A proceeds and an instruction for branching to another program 20B is executed, control is transferred to the head of the corresponding entry in the link control table 13 by branching to the address of the V-format address constant.

そのエントリには,予め実行管理部10への移行命令
列が埋め込まれており,実行管理部10が実行制御を得
る。
In the entry, an instruction sequence for shifting to the execution management unit 10 is embedded in advance, and the execution management unit 10 obtains execution control.

実行管理部10は,分岐型アドレス定数解決処理部11
により,ローダ15に対し,プログラム20Bのロード要求
を出す。
The execution management unit 10 includes a branch-type address constant resolution processing unit 11
As a result, a load request for the program 20B is issued to the loader 15.

これによって,外部記憶装置上のロードモジュール
16からプログラム20Bがローディングされる。
This allows the load module on the external storage device
The program 20B is loaded from 16.

次に参照型アドレス定数解決処理部12が起動され
る。
Next, the reference-type address constant resolution processing unit 12 is activated.

そして,プログラム20BのDALTAB21Bが参照され,外
部プログラムを参照する参照型アドレス定数の有無が調
べられる。
Then, the DALTAB 21B of the program 20B is referred to check whether or not there is a reference type address constant that refers to the external program.

外部プログラムを参照する参照型アドレス定数があ
ると,リンク制御テーブル13を検索することにより,そ
の参照型アドレス定数に該当するエントリが探し出され
る。
If there is a reference-type address constant that refers to an external program, the link control table 13 is searched to find an entry corresponding to the reference-type address constant.

ローダ15に対し,プログラム20Cのロード要求が出
され,プログラム20Cがロードされる。プログラム20Cを
ロードした後,プログラム20Cを示す参照型アドレス定
数に,アドレスを設定する。
A load request for the program 20C is issued to the loader 15, and the program 20C is loaded. After loading the program 20C, the address is set to the reference type address constant indicating the program 20C.

すべての参照型アドレス定数についての処理が終了
したならば,プログラム20Bへ分岐する。
When the processing for all the reference type address constants is completed, the processing branches to the program 20B.

以上の処理により,分岐型アドレス定数による動的リ
ンクが行われると,その時点で,その動的にリンクされ
たプログラムが参照する外部プログラムに対する参照型
アドレス定数も解決されることになる。
With the above processing, when the dynamic link is performed by the branch type address constant, the reference type address constant for the external program referred to by the dynamically linked program is also resolved at that time.

〔実施例〕〔Example〕

第2図は本発明の一実施例で用いられるDALTABのエン
トリ構成例,第3図は本発明の一実施例に係るリンク制
御テーブルのエントリ構成例,第4図は実行管理部への
移行命令列の例,第5図は実行管理部の処理の例,第6
図は本発明の一実施例説明図を示す。
FIG. 2 is an example of an entry configuration of DALTAB used in one embodiment of the present invention, FIG. 3 is an example of an entry configuration of a link control table according to one embodiment of the present invention, and FIG. FIG. 5 shows an example of the process of the execution management unit, FIG.
The figure shows an embodiment of the present invention.

リンカ(リンケージエディタ)は,コンパイラがオブ
ジェクトプログラムの先頭に出力した外部プログラム情
報から,第2図に示すようなエントリ構成を持つDALTAB
21と,第3図に示すようなエントリ構成を持つリンク制
御テーブル13とを作成する。
The linker (linkage editor) uses the DALTAB with the entry configuration shown in Fig. 2 from the external program information output by the compiler at the beginning of the object program.
21 and a link control table 13 having an entry configuration as shown in FIG.

DALTAB21は,各プログラム内にあり,そのプログラム
内にある外部プログラム情報を持つ。その各エントリに
おけるフラグ部21aは,そのエントリが分岐型アドレス
定数に関するものであるか,参照型アドレス定数に関す
るものであるかを識別するためのフラグを持つ。次のア
ドレス/変位部21bは,参照型の場合,外部プログラム
を示すアドレス定数へのポインタ(プログラムの先頭か
らの変位)を持つ。分岐型の場合,このアドレス解決を
行うリンク制御テーブル13のエントリへのアドレスを持
つ。外部プログラム名部21cは,分岐型または参照型の
アドレス定数で指定された外部プログラム名情報を持
つ。
DALTAB21 is in each program and has external program information in that program. The flag section 21a in each entry has a flag for identifying whether the entry is related to a branch address constant or a reference address constant. In the case of the reference type, the next address / displacement unit 21b has a pointer to an address constant indicating the external program (displacement from the beginning of the program). In the case of the branch type, the address has an address to an entry of the link control table 13 for performing the address resolution. The external program name part 21c has external program name information specified by a branch type or reference type address constant.

リンク制御テーブル13は,各プログラムライブラリに
1つあり,そのプログラムライブラリ内のすべてのメン
バ情報を持つ。プログラムが実行されるとき,このリン
ク制御テーブル13が最初にローディングされる。1つの
エントリ形式は,第3図に示す13aないし13hのようにな
っている。
There is one link control table 13 for each program library, and has all the member information in the program library. When the program is executed, the link control table 13 is loaded first. One entry format is like 13a to 13h shown in FIG.

リンク制御テーブル13のエントリにおけるフィールド
13aは,実行管理部10へ実行の制御を移行する命令列を
持つ。フィールド13bは,その実行管理部10のアドレス
を持つ。フィールド13c,13d,13eは,それぞれ汎用レジ
スタのR15,R0,R1の退避域である。この退避域は,フィ
ールド13a内の命令がレジスタ退避用に使用する。
Field in link control table 13 entry
13a has an instruction sequence for shifting the execution control to the execution management unit 10. The field 13b has the address of the execution management unit 10. Fields 13c, 13d, and 13e are save areas for general-purpose registers R15, R0, and R1, respectively. This save area is used by the instructions in the field 13a for saving registers.

フィールド13fは,このプログラム内のDALTABへのポ
インタを持つ。このポインタは,このプログラムの先頭
からの変位である。フィールド13gは,このプログラム
がローディングされたときにアドレスが入る領域であ
り,フィールド13hは,外部プログラム名情報を持つ領
域である。
Field 13f has a pointer to DALTAB in this program. This pointer is a displacement from the beginning of this program. Field 13g is an area where an address is entered when this program is loaded, and field 13h is an area having external program name information.

フィールド13aに格納される命令列は,例えば第4図
に示すような命令である。
The instruction sequence stored in the field 13a is, for example, an instruction as shown in FIG.

(i)の命令は、レジスタのR15,R0,R1を,フィールド1
3c〜13eへ格納する命令である。なお,この命令の実行
時には,R15に,このエントリの先頭アドレスが入ってい
る。
The instruction of (i) stores the registers R15, R0, and R1 in the field 1
Instructions to be stored in 3c to 13e. When this instruction is executed, R15 contains the start address of this entry.

(ii)の命令は,レジスタR15の内容をレジスタR1に入
れる命令である。
The instruction (ii) is an instruction for putting the contents of the register R15 into the register R1.

(iii)の命令は,実行管理部10のアドレスを,レジス
タR15に入れる命令である。
The instruction (iii) is an instruction for putting the address of the execution management unit 10 into the register R15.

(iv)の命令により,実行管理部10へ制御が移される。Control is transferred to the execution management unit 10 by the instruction (iv).

実行管理部10には,分岐型アドレス定数による動的リ
ンクのために,第5図に示すような命令列が用意されて
いる。以下,第5図に示す(i)〜(viii)に従って説
明する。
The execution management unit 10 is provided with an instruction sequence as shown in FIG. 5 for dynamic linking using a branch address constant. Hereinafter, description will be given according to (i) to (viii) shown in FIG.

(i)リンク制御テーブル13のエントリにおけるフィー
ルド13gから,分岐先のアドレスを求める。
(I) The branch destination address is obtained from the field 13g in the entry of the link control table 13.

(ii)分岐先のアドレスが0であるかどうかを調べる。(Ii) Check whether the address of the branch destination is 0.

(iii)分岐先のアドレスが0でなければ,既にローデ
ィングされているので,(v)の命令へ移る。
(Iii) If the address of the branch destination is not 0, since the data has already been loaded, the processing proceeds to the instruction (v).

(iv)オペレーティング・システムへ,分岐先のプログ
ラムのロードを要求する。
(Iv) Request the operating system to load the branch destination program.

(v)分岐先アドレスをレジスタR0からR15に設定す
る。
(V) Set the branch destination address in registers R0 to R15.

(vi)レジスタR0をフィールド13dから復元する。(Vi) Restore the register R0 from the field 13d.

(vii)レジスタR1をフィールド13eから復元する。(Vii) Restore register R1 from field 13e.

(viii)動的リンク対象となっている分岐先へ分岐す
る。
(Viii) Branch to a branch destination that is a dynamic link target.

次に,第6図に従って,本発明の具体的な例を説明す
る。第6図において,プログラム20Aは,プログラム20B
へ制御を渡すようになっており、プログラム20Bでは,
他のプログラム(C)を参照するようになっているとす
る。
Next, a specific example of the present invention will be described with reference to FIG. In FIG. 6, program 20A is equivalent to program 20B.
Control is passed to the program 20B.
It is assumed that another program (C) is referred to.

リンカ(図示省略)は,オブジェクトモジュールを実
行可能式であるロードモジュールに変更する際に,第6
図(イ)に示すように,各プログラム毎に,DALTAB21A,D
ALTAB21Bを作成する。また,リンク制御テーブル13を作
成する。
When the linker (not shown) changes the object module to a load module that is an executable expression,
As shown in Fig. (A), DALTAB21A, D
Create ALTAB21B. Further, a link control table 13 is created.

リンク制御テーブル13は,第6図(イ)の,に示
すように,各プログラム内のDALTAB21A,DALTAB21Bの場
所を,そのプログラムの先頭からの相対アドレスで示
す。また,各DALTABは,,,に示すように,各エ
ントリに対応するアドレス定数の場所を,そのプログラ
ムの先頭からの相対的なアドレスで示す。
The link control table 13 indicates the locations of DALTAB21A and DALTAB21B in each program as shown in FIG. 6A by a relative address from the beginning of the program. Each DALTAB indicates the location of the address constant corresponding to each entry by a relative address from the beginning of the program, as shown in (1) and (2).

実行時には,次のように動作する。 At runtime, it works as follows.

最初に,オペレーティング・システムから,実行管理
部10から起動される。実行管理部10は,リンク制御テー
ブル13をローディングし,その各エントリにおける第3
図に示すフィールド13bに,実行管理部10への制御移行
先のアドレスを格納する。なお,プログラムがリエント
ラントである場合には,リンク制御テーブル13用の領域
を確保し,そこにリンク制御テーブル13の内容を複写し
て使用する。
First, it is started by the execution management unit 10 from the operating system. The execution management unit 10 loads the link control table 13, and stores the third
The address of the control transfer destination to the execution management unit 10 is stored in the field 13b shown in FIG. If the program is reentrant, an area for the link control table 13 is secured, and the contents of the link control table 13 are copied and used there.

プログラム20Aが,主プログラムであるとすると,プ
ログラム20Aをローディングし,そのアドレス(ここで
は500番地とする)を,第6図(ロ)に示すように,リ
ンク制御テーブル13における該当エントリのフィールド
13gにセットする。そして,フィールド13gとフィールド
13fとから,プログラム20A中のDALTAB21Aの先頭アドレ
スを求める。プログラム20Aの先頭アドレスが500であ
り,DALTAB21Aの変位は100であるので,DALTAB21Aの先頭
アドレスは,600番地であることがわかる。
Assuming that the program 20A is the main program, the program 20A is loaded, and its address (here, address 500) is set in the field of the corresponding entry in the link control table 13 as shown in FIG.
Set to 13g. And field 13g and field
From 13f, the start address of DALTAB21A in the program 20A is obtained. Since the start address of the program 20A is 500 and the displacement of the DALTAB21A is 100, it can be seen that the start address of the DALTAB21A is 600.

次に,このDALTAB21A内にある参照型アドレス定数の
解決処理が行われるが,プログラム20A内では,その参
照型アドレス定数がないので,ここではその処理は行わ
れない。
Next, a process of resolving the reference type address constant in the DALTAB 21A is performed. However, since there is no reference type address constant in the program 20A, the process is not performed here.

DALTAB21A中の分岐型アドレス定数(この場合,B)に
対応するリンク制御テーブル13のエントリのアドレスを
求め,プログラム中のV型アドレス定数に,その値(ア
ドレス)を設定する。V型アドレス定数の場所は,DALTA
B21Aのポインタ(b)からわかる。V型アドレス定数
は,第6図(ロ)に示すポインタ(c)のように,プロ
グラム20Bの該当エントリをポイントすることになる。
The address of the entry in the link control table 13 corresponding to the branch type address constant (B in this case) in the DALTAB 21A is obtained, and the value (address) is set in the V-type address constant in the program. The location of the V-type address constant is DALTA
It can be seen from the pointer (b) of B21A. The V-type address constant points to the corresponding entry of the program 20B, as indicated by a pointer (c) shown in FIG.

すべてのアドレス定数が解決されたならば,プログラ
ム20Aに制御を渡す。
When all address constants have been resolved, control is passed to the program 20A.

プログラム20Aを実行が進み、第6図(イ)に示す命
令i1,命令i2が実行されると,他のプログラム(プログ
ラム20B)へ制御を移行するための処理が行われる。な
お,他のプログラムへ制御を渡す場合には,静的結合の
場合も同様であるが,命令i1,命令i2が必要になる。
When the execution of the program 20A proceeds and the instructions i1 and i2 shown in FIG. 6 (a) are executed, a process for shifting the control to another program (program 20B) is performed. Note that when transferring control to another program, the same applies to the case of static combination, but an instruction i1 and an instruction i2 are required.

命令i1により,レジスタR15には,分岐先(この場合,
B)に対応するリンク制御テーブル13のエントリのアド
レスが入り、次の命令i2(BALR命令)により,このエン
トリの先頭に制御が渡る。そして,第4図に示す命令の
実行により,実行管理部10へ制御が移行する。
The instruction i1 stores the branch destination (in this case,
The address of the entry of the link control table 13 corresponding to B) is entered, and control is transferred to the head of this entry by the next instruction i2 (BALR instruction). Then, control is transferred to the execution management unit 10 by executing the instruction shown in FIG.

プログラム20Aからプログラム20Bへの分岐は,実行管
理部10において,第5図に示すような命令の実行により
行われる。
The branch from the program 20A to the program 20B is performed in the execution management unit 10 by executing an instruction as shown in FIG.

このプログラム20Bでは,外部プログラムCのアドレ
スが参照されているので、このプログラム20Bへの分岐
の前に,参照型アドレス定数の解決処理が行われる。そ
のため,まずプログラム20BのDALTAB21Bの検索を行う。
第6図(ハ)に示すようなアドレス値になっているとす
ると,DALTAB21Bのアドレスは,リンク制御テーブル13か
ら,プログラム20Bの先頭アドレスが1000であることが
わかり,そのDALTAB21Bの変位が200であることがわかる
ので,1200番地であることがわかる。
In the program 20B, since the address of the external program C is referred to, the reference type address constant is resolved before branching to the program 20B. Therefore, first, DALTAB21B of the program 20B is searched.
If the address value is as shown in FIG. 6 (c), the DALTAB21B address is found from the link control table 13 to be 1000, the start address of the program 20B is 1000, and the DALTAB21B displacement is 200. Because we know that there is, we know that it is 1200 address.

次に,DALTAB21Bを検索すると,プログラムCを参照型
アドレス定数で参照していることがわかるので,リンク
制御テーブル13から,そのプログラムCに該当するエン
トリを探し出す。そして,プログラムCのローディング
をオペレーティング・システムに要求し,プログラムC
をロードする。その後,プログラムCのアドレスを,リ
ンク制御テーブル13の該当エントリに設定すると共に,
そのアドレスをプログラム20B内の参照型アドレス定数
に入れる。以上により,外部プログラムであるプログラ
ムCに対する参照型アドレス定数が解決されることにな
る。
Next, when the DALTAB 21B is searched, it is found that the program C is referred to by the reference-type address constant. Therefore, the link control table 13 is searched for an entry corresponding to the program C. Then, the loading of the program C is requested to the operating system, and the program C is loaded.
To load. Thereafter, the address of the program C is set in the corresponding entry of the link control table 13, and
The address is put in the reference type address constant in the program 20B. As described above, the reference type address constant for the program C which is an external program is resolved.

また,DALTAB21B中の分岐型アドレス定数(この場合,
D)に対するリンク制御テーブル13のエントリのアドレ
スを求め,プログラム20B中のV型アドレス定数(第6
図(ハ)に示すポインタ(d)によってDALTABからポイ
ントされている)に,そのエントリのアドレスを設定す
る。このポインタが第6図(ハ)では,(e)で示され
ている。
Also, the branch address constant in DALTAB21B (in this case,
The address of the entry in the link control table 13 for D) is obtained, and the V-type address constant (the sixth
The address of the entry is set in the pointer (d) indicated by (d) shown in FIG. This pointer is indicated by (e) in FIG.

すべてのアドレス定数に対して,以上の処理が終了し
たならば,プログラム20Bに制御を渡す。
When the above processing is completed for all address constants, control is passed to the program 20B.

〔発明の効果〕〔The invention's effect〕

以上説明したように,本発明によれば,分岐型アドレ
ス定数による動的結合時に,そこでさらに他のプログラ
ムを参照する参照型アドレス定数も解決されることにな
り,あらかじめ静的結合を行わなくても,他のプログラ
ムのアドレスを参照することができるようになる。従っ
て,各プログラムの独立性が増し,プログラムの開発や
変更等が容易になる。
As described above, according to the present invention, at the time of dynamic connection by the branch type address constant, the reference type address constant referring to another program is also resolved there. Can also refer to the address of another program. Therefore, the independence of each program is increased, and the development and change of the program are facilitated.

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

第1図は本発明の原理説明図, 第2図は本発明の一実施例で用いられるDALTABのエント
リ構成例, 第3図は本発明の一実施例に係るリンク制御テーブルの
エントリ構成例, 第4図は実行管理部への移行命令列の例, 第5図は実行管理部の処理の例, 第6図は本発明の一実施例説明図を示す。 図中,10は実行管理部,11は分岐型アドレス定数解決処理
部,12は参照型アドレス定数解決処理部,13はリンク制御
テーブル,14はオペレーティング・システム,15はロー
ダ,16はロードモジュール,20A〜20Cはプログラム,21A〜
21CはDALTABを表す。
FIG. 1 is a diagram for explaining the principle of the present invention, FIG. 2 is an example of an entry configuration of DALTAB used in one embodiment of the present invention, FIG. 3 is an example of an entry configuration of a link control table according to one embodiment of the present invention, FIG. 4 is an example of a sequence of instructions for shifting to the execution management unit, FIG. 5 is an example of processing of the execution management unit, and FIG. In the figure, 10 is an execution management unit, 11 is a branch type address constant resolution processing unit, 12 is a reference type address constant resolution processing unit, 13 is a link control table, 14 is an operating system, 15 is a loader, 16 is a load module, 20A-20C is a program, 21A-
21C represents DALTAB.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】各々独立に作成されたプログラムを,実行
時に動的に結合させて動作させる処理機能を有するデー
タ処理システムにおいて, 少なくとも,未解決である分岐型アドレス定数による分
岐先となるプログラムをローディングし結合する処理手
段と,ローディングしたプログラム内に外部プログラム
のアドレスを参照する未解決の参照型アドレス定数があ
る場合にその外部プログラムをローディングし該参照型
アドレス定数を解決する処理手段とを有する実行管理部
(10)と, 動的に解決されるべき分岐型および参照型のアドレス定
数に対応して,各エントリに,他の外部プログラムへの
分岐時に制御が渡されて前記実行管理部へ制御を移行す
る命令と外部プログラム情報とを持つリンク制御テーブ
ル(13)とを備え, 各プログラムの動的結合要求時に,前記リンク制御テー
ブルを介して前記実行管理部を起動し,結合されるプロ
グラムに係る外部プログラムに対する参照型アドレス定
数を解決するようにしたことを特徴とする外部参照型ア
ドレス定数の動的解決処理方式。
In a data processing system having a processing function of dynamically combining programs created independently at the time of execution, at least a program to be branched to by an unresolved branch address constant is determined. Processing means for loading and combining; and processing means for loading an external program when there is an unresolved reference type address constant referring to the address of the external program in the loaded program and resolving the reference type address constant. In response to the execution management unit (10) and the branch-type and reference-type address constants to be dynamically resolved, control is passed to each entry when branching to another external program, and the execution management unit (10) A link control table (13) having instructions for transferring control and external program information is provided. An external reference type address constant, wherein the execution management unit is started via the link control table when a dynamic connection request is issued, and a reference type address constant for an external program relating to a program to be connected is resolved. Dynamic resolution processing method.
JP63009107A 1988-01-19 1988-01-19 Dynamic resolution processing method of external reference type address constant Expired - Fee Related JP2621898B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63009107A JP2621898B2 (en) 1988-01-19 1988-01-19 Dynamic resolution processing method of external reference type address constant

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63009107A JP2621898B2 (en) 1988-01-19 1988-01-19 Dynamic resolution processing method of external reference type address constant

Publications (2)

Publication Number Publication Date
JPH01184531A JPH01184531A (en) 1989-07-24
JP2621898B2 true JP2621898B2 (en) 1997-06-18

Family

ID=11711405

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63009107A Expired - Fee Related JP2621898B2 (en) 1988-01-19 1988-01-19 Dynamic resolution processing method of external reference type address constant

Country Status (1)

Country Link
JP (1) JP2621898B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62241031A (en) * 1986-04-11 1987-10-21 Nec Corp Dynamic link controller for program

Also Published As

Publication number Publication date
JPH01184531A (en) 1989-07-24

Similar Documents

Publication Publication Date Title
US5359730A (en) Method of operating a data processing system having a dynamic software update facility
US6848106B1 (en) Snapshot restore of application chains and applications
US6917963B1 (en) Snapshot image for the application state of unshareable and shareable data
JP4021520B2 (en) Method and system for loading classes into read-only memory
US6317870B1 (en) System and method for optimization of inter-module procedure calls
EP1114366B1 (en) Accurate method for inlining virtual calls
US20060095483A1 (en) Modified computer architecture with finalization of objects
US5764947A (en) System and method for automatically interfacing call conventions between two dissimilar program units
CN115495158B (en) Dynamic construction method for system service in microkernel operating system
JP2007534065A (en) Improved computer architecture with object finalization
JPH01154267A (en) Address resolution method for input/output device control program
US7770169B2 (en) Thread rendezvous for read-only code in an object-oriented computing environment
US5764962A (en) Emulation of asynchronous signals using a branch mechanism
KR950006617B1 (en) Linking method and apparatus of program units program activation
US20040123308A1 (en) Hybird of implicit and explicit linkage of windows dynamic link labraries
JPH09237202A (en) Method for executing debugging processing
US6256751B1 (en) Restoring checkpointed processes without restoring attributes of external data referenced by the processes
US6684395B2 (en) Multiple image dynamic bind and load procedure for a multi-processor
JP2621898B2 (en) Dynamic resolution processing method of external reference type address constant
US6748503B1 (en) System and method facilitating unmanaged code participation in garbage collection
JPH0754467B2 (en) Data processing device
JP2841363B2 (en) External module acquisition method
JPS63626A (en) program management device
JPH11110250A (en) Software execution mode switching method
JPH04205422A (en) Program automatic translation combination and selection method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees