JPH0675757A - Virtual space resident program link method - Google Patents
Virtual space resident program link methodInfo
- Publication number
- JPH0675757A JPH0675757A JP22690692A JP22690692A JPH0675757A JP H0675757 A JPH0675757 A JP H0675757A JP 22690692 A JP22690692 A JP 22690692A JP 22690692 A JP22690692 A JP 22690692A JP H0675757 A JPH0675757 A JP H0675757A
- Authority
- JP
- Japan
- Prior art keywords
- program
- address
- list
- linking
- name
- 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
Links
Landscapes
- Stored Programmes (AREA)
Abstract
(57)【要約】
【目的】仮想記憶内に常駐するプログラムをリンクする
場合に、定型的な方法で各プログラム同一の少ないダイ
ナミックステップでリンクすることを目的とする。
【構成】仮想記憶内に常駐するプログラムのアドレスリ
スト及びアドレスリストと同一形式を持つプログラム名
称リストから構成される。プログラム名称リストは、コ
ンパイル時プログラム内に取り込み、被リンクプログラ
ムのアドレス定義として使用する。
(57) [Abstract] [Purpose] When linking a program that resides in virtual memory, the purpose is to link with a small number of dynamic steps that are the same for each program in a standard method. [Structure] An address list of programs resident in virtual memory and a program name list having the same format as the address list. The program name list is included in the compile-time program and used as the address definition of the linked program.
Description
【0001】[0001]
【産業上の利用分野】本発明は、プログラムのリンク方
式に関し、特に、コンピュータシステム上の仮想空間に
常駐するプログラムが多数有り、それぞれ互いにリンク
する構造をもっており、常駐プログラムの数が多いか、
又は、プログラム属性が異なるため、1つの実行形式と
してバインドはできないが、性能をあげるためにリンク
のダイナミックステップを少なくし、どのプログラムも
同一ステップでリンクする仮想空間常駐プログラムのリ
ンク方式に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program linking method, and in particular, there are many programs resident in a virtual space on a computer system, each of which has a structure of linking with each other.
Or, because the program attributes are different, it is not possible to bind as one execution form, but to improve performance, the number of dynamic steps of linking is reduced, and it relates to the linking method of a virtual space resident program that links all programs at the same step. .
【0002】[0002]
【従来の技術】複数のプログラムをリンクする方法とし
て、必要に応じて外部記憶装置から対象となるプログラ
ムをロードしてリンクする方式と、あらかじめ仮想空間
に対象となるプログラムをロードしておきアドレスを参
照する方式に大別される。2. Description of the Related Art As a method for linking a plurality of programs, a method of loading a target program from an external storage device and linking it as necessary, and a method of loading a target program in a virtual space in advance It is roughly divided into the methods to refer to.
【0003】前者に対する性能向上はI/O回数を減ら
すことが重要な技術となっている。To improve the performance of the former, reducing the number of I / Os is an important technique.
【0004】例えば、特開平2−60011号公報に記
載の一括ローディング処理方式では、モジュールロード
のI/O回数を1回に減少させる技術が開示されてい
る。すなわち、本方式では、ロードするモジュールテキ
スト群及びモジュールに関するリロケーションデータ群
の、直接アクセス装置内の位置及び大きさをディレクト
リ内に持っており、ディレクトリ読み込み後、ディレク
トリ情報にあわせCCWチェインを作成し、一回のI/
Oでモジュールロードを行う方式である。For example, in the batch loading processing method disclosed in Japanese Patent Laid-Open No. 2-60011, there is disclosed a technique for reducing the number of I / Os for module loading to one. That is, in this method, the position and size of the module text group to be loaded and the relocation data group related to the module in the direct access device are held in the directory, and after reading the directory, a CCW chain is created according to the directory information, I / times
This is a method of loading modules with O.
【0005】一方、後者は、I/Oオーバヘッドをなく
すために、しばしば採用される技術である。例えば再利
用可能なプログラムを仮想空間に常駐し、そのアドレス
を定められた領域に設定し、プログラムをリンクする方
法である。その具体的な方法は、あらかじめ、アドレス
を設定するテーブルを決めておき、リンク側プログラム
コンパイル時、プログラム内で被リンクプログラムを定
義し、アドレスを確定しておき、リンク時に被リンクプ
ログラムの名称で参照するものである。これにより外部
装置からの入力を行わずに、ダイナミックステップを少
なくリンクすることが可能となる。On the other hand, the latter is a technique often adopted to eliminate the I / O overhead. For example, there is a method in which a reusable program is made to reside in a virtual space, its address is set in a predetermined area, and the program is linked. The concrete method is to decide the table to set the address in advance, define the linked program in the program when compiling the link side program, determine the address, and use the name of the linked program at linking. It is for reference. This makes it possible to link with a small number of dynamic steps without input from an external device.
【0006】又、高速にリンクすることを目的とした、
モジュールリンク方式として特開昭61−160135
号公報に記載の技術がある。本方式はモジュール管理テ
ーブルでモジュールのロード状態を管理するものであ
る。プログラムからモジュールのリンク要求があると、
ローダはモジュール管理テーブルを参照し、モジュール
がロード済の場合ロード済みのモジュールのアドレスを
返し、ロードしてない場合はロード後アドレスを返すよ
うになっている。但し、本方式は、あらかじめモジュー
ルがロードされているとは限らない場合に使用する方法
である。あらかじめロードされているプログラムに限定
した場合は、ロードしたプログラムのアドレスをテーブ
ルに設定しておき、プログラム内で必要に応じ、被リン
クプログラムを定義してリンクする前述の方式が一般的
である。[0006] Further, for the purpose of linking at high speed,
As a module link system, JP-A-61-160135
There is a technique described in Japanese Patent Publication. In this system, the module management table manages the load status of modules. When a program requests to link a module,
The loader refers to the module management table, and returns the address of the loaded module when the module is already loaded, and the post-loading address when the module is not loaded. However, this method is used when the module is not always loaded in advance. In the case of limiting to a pre-loaded program, the above-mentioned method is generally used in which the address of the loaded program is set in a table, and a linked program is defined and linked as needed in the program.
【0007】[0007]
【発明が解決しようとする課題】従来の技術で述べたよ
うに、常駐プログラムのアドレスを参照しリンクする方
式はダイナミックステップの減少に有効であるが、以下
の点で問題がある。すなわち、常駐するプログラムが多
く、プログラム間で何度もリンクしあう場合、リンク側
で、被リンクプログラムを全部定義しアドレスを確定し
ておく必要がある。リンク被リンクの関連が複雑な場
合、プログラム内の手続きが複雑化し生産性及び保守性
の低下を引き起こす。従って、プログラム内で定型的な
定義を行い、ダイナミックステップを少なく呼出しが行
える定型的で簡明な方式は、プログラムの生産性、保守
性、及び、性能の観点から有効である。本発明の目的
は、以上の点に関し改善を図るものとして、仮想空間常
駐プログラムの定形的で簡明なリンク方式を提供するも
のである。As described in the prior art, the method of referring to and linking the address of the resident program is effective in reducing the dynamic steps, but has the following problems. That is, when there are many resident programs and many programs are linked with each other, it is necessary for the link side to define all linked programs and determine the addresses. When the relation between linked and linked is complicated, the procedure in the program becomes complicated and productivity and maintainability deteriorate. Therefore, a standard and simple method that can perform standard definition in a program and call with few dynamic steps is effective from the viewpoint of program productivity, maintainability, and performance. An object of the present invention is to provide a fixed and simple link method for a virtual space resident program in order to improve the above points.
【0008】[0008]
【課題を解決するための手段】前記の課題を解決するた
めに、本発明では、仮想空間に常駐するプログラムが複
数ある場合は、それぞれのアドレスの設定領域を集めて
リスト形式にする。このリストをアドレスリストと呼
ぶ。次にアドレスリストと全く同一の形式を持つリスト
を定義する。本リストはアドレスリスト内のプログラム
のアドレス領域に対応する位置に、それぞれ対応する常
駐プログラムの名称を定義してある。本リストをプログ
ラム名称リストと呼ぶ。In order to solve the above-mentioned problems, in the present invention, when there are a plurality of programs resident in the virtual space, the setting areas of the respective addresses are collected and made into a list format. This list is called an address list. Next, define a list that has exactly the same format as the address list. In this list, the names of the corresponding resident programs are defined at positions corresponding to the address areas of the programs in the address list. This list is called a program name list.
【0009】各プログラムでは、コンパイル時プログラ
ム名称リストを取り込んでおく。この結果、被リンクプ
ログラムのアドレスは確定する。プログラムにリンクす
る場合は、リンク命令に、該当するプログラムの名称を
指定する。これにより、アドレスリストを参照するダイ
ナミックステップで、リンクが可能となる。またどのプ
ログラムのリンクステップも同一となる。A compile-time program name list is loaded in each program. As a result, the address of the linked program is fixed. When linking with a program, specify the name of the corresponding program in the link command. This enables linking in a dynamic step that refers to the address list. Also, the link step of any program is the same.
【0010】すなわち、各プログラム内で個別にリンク
プログラムのアドレスを定義する必要がなくなり、定型
的かつ簡略な記述が可能となる。In other words, it is not necessary to individually define the address of the link program in each program, and it becomes possible to make a standard and simple description.
【0011】[0011]
【作用】提供するマクロを使用する。プログラム名称リ
ストを取り込んだプログラムが、被リンクプログラムの
名称を指定して本マクロを使用すると、コンパイラが、
アドレスリストを基に命令を生成する。命令の内容は以
下の通りである。[Operation] Use the provided macro. When the program that has imported the program name list specifies the name of the linked program and uses this macro, the compiler
Generate an instruction based on the address list. The contents of the instruction are as follows.
【0012】アドレスリストのベース設定を行ない、被
リンクプログラムの名称定義領域のプログラム名称リス
ト内の相対アドレスをそれに加え、ブランチをする。The base of the address list is set, the relative address in the program name list of the name definition area of the linked program is added to it, and a branch is made.
【0013】被リンクプログラムの名称定義領域の、プ
ログラム名称リスト内の相対アドレスと、アドレスリス
ト内の対応する被リンクプログラムのアドレス設定領域
の相対アドレスは同一のため、アドレスリストのベース
に加えた結果は、アドレスリスト内の指定被リンクプロ
グラムのアドレス設定領域のアドレスとなる。従って、
その値によりブランチをすれば目的とするプログラムへ
のリンクが可能となる。Since the relative address in the program name list of the name definition area of the linked program and the relative address of the address setting area of the corresponding linked program in the address list are the same, the result added to the base of the address list Is the address of the address setting area of the specified linked program in the address list. Therefore,
If you branch based on that value, you can link to the target program.
【0014】以上から、効果は次の通りである。From the above, the effects are as follows.
【0015】プログラムにはプログラム名称リストの定
義及び被リンクプログラムの名称を指定したリンクマク
ロを記述すればよいため、リンク指定の定型化、簡略化
を図ることができる。又、リンクに要するステップは数
ステップであり、更に、被リンクプログラムによらず、
一定であるため、プログラムに依らない性能向上に効果
がある。Since it is sufficient to describe the definition of the program name list and the link macro designating the name of the linked program in the program, it is possible to standardize and simplify the link designation. Also, the steps required for linking are several steps, and further, regardless of the linked program,
Since it is constant, it is effective in improving performance independent of the program.
【0016】[0016]
【実施例】本発明の一実施例を図面に従って具体的に説
明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be specifically described with reference to the drawings.
【0017】図1はシステムの構成である。アドレスリ
スト及び仮想空間常駐プログラムが記憶装置内に存在し
ている。FIG. 1 shows the system configuration. An address list and a virtual space resident program exist in the storage device.
【0018】図2は、プログラムのアドレスを設定する
アドレスリスト5と、それと同一形式及び同一の大きさ
を持つ、プログラム名称リスト1の関連を示している。
両者は同一形式であるが、設定情報は異なっている。す
なわち、アドレスリスト5内のプログラムアドレスの設
定領域6には仮想空間に常駐するプログラムのアドレス
が設定されている。一方、プログラム名称リスト1内の
同一位置のプログラム名称領域7には、プログラムアド
レスの設定領域6に設定した、対象となるプログラムの
名称が定義してある。したがって、アドレスリスト5に
アドレスを設定するプログラムの順序とプログラム名称
リスト1に定義するプログラムの順序は同一である。又
それぞれの領域の相対アドレスは同一になる。本例で
は、プログラムBは両方のリスト内の2番目にそれぞ
れ、アドレスと名称が設定されている。FIG. 2 shows the relationship between the address list 5 for setting the program addresses and the program name list 1 having the same format and the same size as the address list 5.
Both have the same format, but the setting information is different. That is, the address of the program resident in the virtual space is set in the program address setting area 6 in the address list 5. On the other hand, in the program name area 7 at the same position in the program name list 1, the name of the target program set in the program address setting area 6 is defined. Therefore, the order of programs for setting addresses in the address list 5 and the order of programs for defining the program name list 1 are the same. The relative address of each area is the same. In this example, the program B has an address and a name set second in both lists.
【0019】図3はコンパイル及び実際のリンク処理時
の両リストの参照関係を示している。プログラムBをリ
ンクするプログラム8は、データ定義部81と、プログ
ラム実行部82から成っており、データ定義部81でプ
ログラム名称リスト1を取り込んでおく。又、プログラ
ム実行部82内で、リンクマクロ命令@LINK83に
よってプログラムBをリンクしている。Bの名称を指定
したリンクマクロ命令のステートメント@LINK83
を記述すると、図4に示すように、コンパイル時、仮想
空間常駐プログラムBリンク時のプログラム内処理フロ
ーに示す命令が生成される。本例では、図3に示すよう
に、プログラムBの名称がプログラム名称リスト1内の
2番目に定義されていることから、Bのアドレスはアド
レスリスト5内の2番目の領域にあることを基に命令が
生成がされる。FIG. 3 shows the reference relationship between both lists during compilation and actual link processing. The program 8 for linking the program B is composed of a data definition section 81 and a program execution section 82, and the data definition section 81 fetches the program name list 1. In the program execution unit 82, the program B is linked by the link macro instruction @ LINK83. Link macro instruction statement @ LINK83 with name B specified
4, the instructions shown in the in-program processing flow at the time of compiling and linking of the virtual space resident program B are generated as shown in FIG. In this example, since the name of the program B is defined second in the program name list 1 as shown in FIG. 3, it is determined that the address of B is in the second area in the address list 5. An instruction is generated at.
【0020】プログラム8を実行し、プログラムBをリ
ンクすると、アドレスリスト5のアドレスに、プログラ
ム名称リスト1の2番目の領域の相対アドレス(=アド
レスリストのプログラムBのアドレスを格納した領域の
相対アドレス)が加えられ、プログラムBのアドレスが
求まり、プログラムBにリンクできることになる。When program 8 is executed and program B is linked, the relative address of the second area of program name list 1 is added to the address of address list 5 (= the relative address of the area storing the address of program B of the address list). ) Is added, the address of the program B is obtained, and the program B can be linked.
【0021】リンクのダイナミックステップは図4に示
すように数ステップであり、どのプログラムもプログラ
ム名称リスト1内の位置が変わるだけなので、コンパイ
ル時に生成されるリンクのステップ数は同一になる。The dynamic steps of linking are several steps as shown in FIG. 4, and since all programs only change the position in the program name list 1, the number of linking steps generated during compilation is the same.
【0022】[0022]
(1)簡略化 複数のプログラムをリンクする場合、それぞれプログラ
ムのアドレスを定義する必要が有った。これに反し、本
方式ではプログラム名称リストを定義すれば、個別定義
は不要となり、リンクマクロに被リンクプログラム名称
を指定するだけでよい。(1) Simplification When linking multiple programs, it was necessary to define the address of each program. On the contrary, in this method, if the program name list is defined, individual definition becomes unnecessary, and it is only necessary to specify the linked program name in the link macro.
【0023】(2)性能の向上 外部記憶装置からの入力がない点で性能は向上している
が、更にどのプログラムに対しても数ステップかつ同一
のステップでリンクできる。(2) Improvement of performance Although the performance is improved in that there is no input from the external storage device, it is possible to link any program in several steps and in the same step.
【図1】システム構成図である。FIG. 1 is a system configuration diagram.
【図2】アドレスリスト及びプログラム名称リストを示
す図である。FIG. 2 is a diagram showing an address list and a program name list.
【図3】コンパイル時及びプログラムリンクの例を示す
図である。FIG. 3 is a diagram showing an example of compiling and program linking.
【図4】プログラムリンクの処理の流れを示すフローチ
ャートである。FIG. 4 is a flowchart showing a flow of processing of program link.
1…プログラム名称リスト、 2…プログラムAの名称、 3…プログラムBの名称、 4…プログラムCの名称、 5…アドレスリスト、 6…プログラムアドレスの設定領域、 7…プログラム名称領域、 8…プログラムBをリンクするプログラム、 81…プログラム8のデータ定義部、 82…プログラム8のプログラム実行部、 83…プログラムBをリンクする@LINKマクロ命
令。1 ... Program name list, 2 ... Program A name, 3 ... Program B name, 4 ... Program C name, 5 ... Address list, 6 ... Program address setting area, 7 ... Program name area, 8 ... Program B 81 ... a data definition part of the program 8, 82 ... a program execution part of the program 8, 83 ... an @LINK macro instruction for linking the program B.
───────────────────────────────────────────────────── フロントページの続き (72)発明者 五十嵐 歳一 神奈川県横浜市中区尾上町6丁目81番地日 立ソフトウェアエンジニアリング株式会社 内 (72)発明者 塩谷 隆廣 神奈川県横浜市戸塚区戸塚町5030番地株式 会社日立製作所ソフトウェア開発本部内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Toshikazu Igarashi 6-81 Onoue-cho, Naka-ku, Yokohama-shi, Kanagawa, Hitachi Software Engineering Co., Ltd. (72) Inventor Takahiro Shiotani 5030 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Bunch Co., Ltd.Hitachi Ltd. Software Development Division
Claims (1)
びアドレスの一覧からなるアドレスリストと、アドレス
リストと同一形式を持つプログラム名称リストの組によ
り、コンパイル時点で、リンクするプログラムのアドレ
スを確定し、少ないダイナミックステップかつ各プログ
ラム同一のダイナミックステップでリンクすることを特
徴とする仮想空間常駐プログラムのリンク方式。1. An address of a program to be linked is fixed at the time of compilation by a set of an address list consisting of a list of attributes and addresses of a program resident in a virtual space and a program name list having the same format as the address list. , Linking method of resident program in virtual space characterized by linking with a small number of dynamic steps and the same dynamic step for each program.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP22690692A JPH0675757A (en) | 1992-08-26 | 1992-08-26 | Virtual space resident program link method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP22690692A JPH0675757A (en) | 1992-08-26 | 1992-08-26 | Virtual space resident program link method |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH0675757A true JPH0675757A (en) | 1994-03-18 |
Family
ID=16852456
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP22690692A Pending JPH0675757A (en) | 1992-08-26 | 1992-08-26 | Virtual space resident program link method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0675757A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007334869A (en) * | 2006-05-16 | 2007-12-27 | Matsushita Electric Ind Co Ltd | Program start device, program start method, start processing program, and integrated circuit |
-
1992
- 1992-08-26 JP JP22690692A patent/JPH0675757A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007334869A (en) * | 2006-05-16 | 2007-12-27 | Matsushita Electric Ind Co Ltd | Program start device, program start method, start processing program, and integrated circuit |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JPH06223043A (en) | Decentralized memory type processor system | |
| JPH01118931A (en) | Program conversion method | |
| US5241634A (en) | Method of handling system calls to an operating system of a computer by system service routines stored as firmware | |
| JPH0675757A (en) | Virtual space resident program link method | |
| US6772292B2 (en) | Two area stack | |
| JP3481268B2 (en) | Library module management method | |
| JP2601541B2 (en) | FORTRAN input / output list processing method | |
| JPS63106047A (en) | Dynamic subroutine call system | |
| JPH01207824A (en) | Module coupling control system | |
| JPH0221610B2 (en) | ||
| JP3293821B2 (en) | Dynamic link system | |
| JP2004126739A (en) | Name resolution method | |
| JPS583042A (en) | Program execution system | |
| JPH07129408A (en) | Executing system for language processing program | |
| JPH0327439A (en) | Shared module managing system for program | |
| JPH07141189A (en) | Overlay linking system | |
| JPS63245722A (en) | Load module linking system | |
| JPH05204636A (en) | Method for setting load address | |
| JPH03164835A (en) | Compilation method for global variable processing in interpreted language processing systems | |
| JPH0553827A (en) | Dynamic link optimizing system | |
| JPH0792757B2 (en) | Optimal data allocation method | |
| JPH02231639A (en) | Calling system for service program | |
| JPH04155443A (en) | Method for obtaining address for area acquired at time of execution | |
| JPH1196003A (en) | Computer multiple bank control method | |
| JPH0447337B2 (en) |