JP2005284963A - Method and system for loading program - Google Patents

Method and system for loading program Download PDF

Info

Publication number
JP2005284963A
JP2005284963A JP2004100763A JP2004100763A JP2005284963A JP 2005284963 A JP2005284963 A JP 2005284963A JP 2004100763 A JP2004100763 A JP 2004100763A JP 2004100763 A JP2004100763 A JP 2004100763A JP 2005284963 A JP2005284963 A JP 2005284963A
Authority
JP
Japan
Prior art keywords
relocatable
storage device
file
program
section
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
JP2004100763A
Other languages
Japanese (ja)
Inventor
Hideaki Yamamoto
英明 山本
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2004100763A priority Critical patent/JP2005284963A/en
Publication of JP2005284963A publication Critical patent/JP2005284963A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a method and a system for loading programs, which may reduce a period of an executing cycle for a program loader as well as a time period for transferring a file to a targeted system. <P>SOLUTION: The system includes a relocatable file storage 2, a data output unit 18 for transferring a relocatable object file to a targeted system 47; a section data storage unit 3 for storing a section table data which is transferred from the targeted system 47; a linker 5 which is coupled to the relocatable file storage 2 and the section data storage 3 for generating an absolute object file; an absolute object storage unit 4 for storing the absolute object files; a relocatable file storage unit 2; a section data storage unit 3; and a central processing unit 33 which controls the absolute file storage 4 and the linker 5. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、リロケータブルオブジェクトファイル形式のプログラムをロードするプログラムローディング装置およびプログラムローディング方法に関する。   The present invention relates to a program loading apparatus and a program loading method for loading a relocatable object file format program.

従来のプログラムローディング装置は、ホストシステムでプログラムのロードアドレス情報とフック(設定)情報とをシンボルテーブルに追加してリロケータブルオブジェクトファイルを作成し、ターゲットシステムへリロケータブルオブジェクトファイルを転送し、ターゲットシステム上で、そのロードアドレス情報に従ってシンボル配置アドレスを決定し、また、フック情報に従ってシンボルのフック処理を実行し、プログラムのシンボル毎にユーザが指定したターゲットシステム上のアドレスへシンボルを配置していた(特許文献1参照。)。
特開2002−132521号公報(段落0061、図1参照)
A conventional program loading apparatus creates a relocatable object file by adding program load address information and hook (setting) information to a symbol table in a host system, and transfers the relocatable object file to the target system. The symbol allocation address is determined according to the load address information, and the symbol hook processing is executed according to the hook information, and the symbol is allocated to the address on the target system designated by the user for each symbol of the program (Patent Document) 1).
JP 2002-132521 A (see paragraph 0061, FIG. 1)

しかしながら、リロケータブルオブジェクトファイルは、オブジェクト中でアドレス未解決セクションや、未解決シンボルを参照する度に計算式で表現されるため、アブソリュートオブジェクトファイルに比べてオブジェクトファイルの容量が大きくなり、ターゲットシステムへの転送時間又はプログラムローダの実行処理サイクル期間が増大するという課題が存在していた。   However, since the relocatable object file is expressed by a calculation formula each time an address unresolved section or unresolved symbol is referenced in the object, the capacity of the object file becomes larger than the absolute object file, and There has been a problem that the transfer time or the execution cycle period of the program loader increases.

そこで、ターゲットシステムへのファイルの転送時間又はプログラムローダの実行処理サイクル期間を短縮するプログラムローディング装置およびプログラムローディング方法を提供することを目的とする。   Accordingly, an object of the present invention is to provide a program loading apparatus and a program loading method for shortening the file transfer time to the target system or the execution cycle period of the program loader.

上記目的を達成するために、本発明の第1の特徴は、例えば、プログラムのリロケータブルオブジェクトファイルを記憶するリロケータブルファイル記憶装置と、リロケータブルファイル記憶装置から読出したリロケータブルオブジェクトファイルをターゲットシステムに転送するデータ出力部と、ターゲットシステムからデータ入力部を通して転送されるセクションテーブルデータを記憶するセクションデータ記憶装置と、リロケータブルファイル記憶装置及びセクションデータ記憶装置に接続し、リロケータブルオブジェクトファイルとセクションテーブルデータを読出して、プログラムのアブソリュートオブジェクトファイルを生成するリンカと、リンカで生成されたアブソリュートオブジェクトファイルを記憶するアブソリュートファイル記憶装置と、リロケータブルファイル記憶装置、セクションデータ記憶装置、及びアブソリュートファイル記憶装置とリンカを制御する中央処理装置と、を備えるプログラムローディング装置であることを要旨とする。   In order to achieve the above object, the first feature of the present invention is, for example, a relocatable file storage device that stores a relocatable object file of a program, and data that transfers a relocatable object file read from the relocatable file storage device to a target system. Connected to the output unit, the section data storage device for storing the section table data transferred from the target system through the data input unit, the relocatable file storage device and the section data storage device, and read the relocatable object file and the section table data, A linker that generates an absolute object file of the program and an absolute file that stores the absolute object file generated by the linker And yl storage device, relocatable file storage device, section data storage device, and summarized in that a program loading device comprising a central processing unit for controlling the absolute file storage and linker, a.

上記目的を達成するために、本発明の第2の特徴は、例えば、プログラムのリロケータブルオブジェクトファイルを記憶するリロケータブルファイル記憶装置と、リロケータブルファイル記憶装置から読出したリロケータブルオブジェクトファイルをターゲットシステムに送信するデータ出力部と、ターゲットシステムからデータ入力部を通して転送されるプログラムのアブソリュートオブジェクトファイルを記憶するアブソリュートファイル記憶装置と、アブソリュートファイル記憶装置から読出したアブソリュートオブジェクトファイルをデータ出力部を経由してターゲットシステムに転送させるロードパスと、リロケータブルファイル記憶装置及びアブソリュートファイル記憶装置を制御する中央処理装置と、を備えるプログラムローディング装置であることを要旨とする。   In order to achieve the above object, the second feature of the present invention is, for example, a relocatable file storage device that stores a relocatable object file of a program, and data that transmits a relocatable object file read from the relocatable file storage device to a target system. Absolute file storage device that stores the absolute object file of the program transferred from the output unit and the target system through the data input unit, and the absolute object file read from the absolute file storage device is transferred to the target system via the data output unit And a central processing unit for controlling a relocatable file storage device and an absolute file storage device. And summarized in that a Ingu device.

上記目的を達成するために、本発明の第3の特徴は、例えば、中央処理装置がプログラムのソースファイルをソースファイル記憶装置に記憶するソースファイル記憶工程と、中央処理装置がソースファイル記憶装置からソースファイルを読出してコンパイルしたプログラムのリロケータブルオブジェクトファイルをリロケータブルファイル記憶装置に記憶するリロケータブルファイル記憶工程と、中央処理装置がリロケータブルファイル記憶装置からターゲットシステムへリロケータブルオブジェクトファイルを転送し、リロケータブルオブジェクトファイルのテスト及びデバッグを実行するデバッグ工程と、中央処理装置がデバッグ工程でリロケータブルオブジェクトファイルのテストを完了させた段階で、ターゲットシステム側で生成されるプログラムのアブソリュートオブジェクトファイルをアブソリュートファイル記憶装置に記憶するアブソリュートファイル記憶工程と、中央処理装置がアブソリュートファイル記憶装置からアブソリュートオブジェクトファイルを読出して、ターゲットシステムへ転送しプログラムのテストをするテスト工程と、を備えるプログラムローディング方法であることを要旨とする。   In order to achieve the above object, the third feature of the present invention is that, for example, a central processing unit stores a source file of a program in a source file storage device, and a central processing unit from the source file storage device. Relocatable file storage process that stores the relocatable object file of the program compiled by reading the source file in the relocatable file storage device, and the central processing unit transfers the relocatable object file from the relocatable file storage device to the target system, and tests the relocatable object file Generated on the target system side when the central processing unit completes the test of the relocatable object file in the debugging process. An absolute file storage process for storing the absolute object file of the program to be stored in the absolute file storage device, a test process for the central processing unit to read the absolute object file from the absolute file storage device, transfer it to the target system, and test the program; A program loading method comprising:

本発明のプログラムローディング装置およびプログラムローディング方法は、ターゲットシステムへのファイルの転送時間又はプログラムローダの実行処理サイクル期間を短縮するという格別な効果を奏する。   The program loading apparatus and the program loading method of the present invention have a special effect of shortening the file transfer time to the target system or the execution period of the program loader.

(第1の実施の形態)
図1は、本発明の第1の実施形態に係るプログラムローディング装置のブロック図である。
(First embodiment)
FIG. 1 is a block diagram of a program loading apparatus according to the first embodiment of the present invention.

プログラムローディング装置は、ホストシステム1とターゲットシステム47を備え、ホストシステム1で作成したリロケータブルオブジェクトファイルを、ターゲットシステム47に設けたランダムアクセスメモリ10(以下、「RAM」と略記する)に転送し、プログラムローダ12を動作させて、未解決アドレスを決定する。   The program loading apparatus includes a host system 1 and a target system 47, transfers a relocatable object file created by the host system 1 to a random access memory 10 (hereinafter abbreviated as “RAM”) provided in the target system 47, The program loader 12 is operated to determine an unresolved address.

ターゲットシステム47は、ホストシステム1からの指令に従いプログラムローダ12で作成したセクション・シンボルテーブル16をホストシステム1へ転送するように構成している。   The target system 47 is configured to transfer the section / symbol table 16 created by the program loader 12 to the host system 1 in accordance with a command from the host system 1.

ホストシステム1は、リロケータブルファイル記憶装置2、セクションデータ記憶装置3、アブソリュートファイル記憶装置4、リンカ5、中央処理装置33(以下、「CPU」と略記する)を備え、CPU33は、入力部8と出力部7に接続し、命令(コマンド)入力やデバッグ処理やプログラムのテスト状況を入出力する。   The host system 1 includes a relocatable file storage device 2, a section data storage device 3, an absolute file storage device 4, a linker 5, and a central processing unit 33 (hereinafter abbreviated as “CPU”). Connect to the output unit 7 to input / output command (command) input, debug processing, and program test status.

また、ホストシステム1は、データ通信部9、データ出力部18、データ入力部19を通してターゲットシステム47と接続し、ファイルやデータやコマンドの送受信を実行する。   The host system 1 is connected to the target system 47 through the data communication unit 9, the data output unit 18, and the data input unit 19, and executes transmission / reception of files, data, and commands.

ここで、入力部8の形態としては、キーボード、マウスポインタ、テンキー、タッチパネルを採用することができ、出力部7の形態としては、ディスプレイ装置や印刷装置を採用することができる。   Here, a keyboard, a mouse pointer, a numeric keypad, and a touch panel can be adopted as the form of the input unit 8, and a display device or a printing device can be adopted as the form of the output unit 7.

ターゲットシステム47は、RAM10とCPU34を備え、RAM10内にリロケータブルオブジェクトセクションデータロード部11と、プログラムローダ12と、セクション・シンボルテーブル16と、プログラムのロード後のセクションデータ記憶装置15を備えている。     The target system 47 includes a RAM 10 and a CPU 34, and includes a relocatable object section data load unit 11, a program loader 12, a section / symbol table 16, and a section data storage device 15 after loading a program.

プログラムローダ12は、未解決アドレス決定部13とセクションデータロード部14を備え、リロケータブルオブジェクトセクションデータロード部11を解析し、ロード後のセクションデータを生成するように構成されている。   The program loader 12 includes an unresolved address determination unit 13 and a section data load unit 14, and is configured to analyze the relocatable object section data load unit 11 and generate section data after loading.

ここで、リロケータブルファイル記憶装置2に記憶するリロケータブルオブジェクト形式のプログラムは、リロケータブルオブジェクトがプログラムの最終的な実行可能形式ではなく、セクション配置アドレスやシンボル値を未解決にして、ターゲットシステム47のRAM10の空き状態に対応させたアドレスにシンボルを配置する自由度の高いプログラムである。   Here, the relocatable object format program stored in the relocatable file storage device 2 is not the final executable format of the program, but the section allocation address and symbol value are unresolved and the relocatable object format program is stored in the RAM 10 of the target system 47. This is a highly flexible program that arranges symbols at addresses corresponding to free states.

CPU33は、入力部8からのコマンドに応答し、リロケータブルファイル記憶装置2からデータ出力部18を通して、ターゲットシステム47側のRAM10にリロケータブルオブジェクトファイル(プログラム)を転送する。   In response to the command from the input unit 8, the CPU 33 transfers the relocatable object file (program) from the relocatable file storage device 2 to the RAM 10 on the target system 47 side through the data output unit 18.

ホストシステム1側のCPU33からリロケータブルオブジェクトファイルを転送した後に、データ通信部9を通してCPU34へプログラムローダ開始のコマンドを送信し、プログラムローダ12を起動させ、リロケータブルオブジェクトセクションデータロード部11のロード処理を実行する。   After the relocatable object file is transferred from the CPU 33 on the host system 1 side, a program loader start command is transmitted to the CPU 34 through the data communication unit 9, the program loader 12 is activated, and the load processing of the relocatable object section data load unit 11 is executed. To do.

ターゲットシステム47側のCPU34は、プログラムローダ12を動作させ、セクション・シンボルテーブル16にセクションテーブルデータを記憶させてから、データ入力部19へセクションテーブルデータを転送する。   The CPU 34 on the target system 47 side operates the program loader 12 to store the section table data in the section / symbol table 16 and then transfers the section table data to the data input unit 19.

CPU33は、転送されたセクションテーブルデータをセクションデータ記憶装置3に記憶し、リンカ5にセクションテーブルデータを与え、リロケータブルファイル記憶装置2に記憶したリロケータブルオブジェクトファイルとリンクさせたアブソリュートオブジェクトファイルをアブソリュートファイル記憶装置4に記憶する。   The CPU 33 stores the transferred section table data in the section data storage device 3, gives the section table data to the linker 5, and stores the absolute object file linked to the relocatable object file stored in the relocatable file storage device 2 in the absolute file. Store in device 4.

図2は、本発明の第1の実施形態に用いるプログラムローディング処理のフローチャートである。図1のブロック図及び図2のフローチャートを参照して、プログラムローディング装置の動作を説明する。   FIG. 2 is a flowchart of the program loading process used in the first embodiment of the present invention. The operation of the program loading apparatus will be described with reference to the block diagram of FIG. 1 and the flowchart of FIG.

CPU34は、セクションアドレス解析ステップ20(以下、ステップを「ST」と略記する)で未解決アドレス決定部13を動作させ、リロケータブルオブジェクトセクションデータロード部11のセクション定義部を解析する。   The CPU 34 operates the unresolved address determination unit 13 in the section address analysis step 20 (hereinafter, “step” is abbreviated as “ST”), and analyzes the section definition unit of the relocatable object section data load unit 11.

CPU34は、判定ST21でセクションアドレスが未解決と判定(YES)した場合は、ST22に分岐し、RAM10の空き領域から「サイズ」で定義されている容量をセクションデータ領域として確保し、このデータ領域の先頭アドレスを「セクションアドレス」として決定する。   If the CPU 34 determines in step ST21 that the section address is unresolved (YES), the CPU 34 branches to ST22, reserves the capacity defined by the “size” from the free area of the RAM 10 as a section data area, and this data area Is determined as a “section address”.

一方、CPU34は、判定ST21でセクションアドレス解決と判定(NO)した場合は、ST23へ分岐し、「アドレス」で指定されているRAM10の空き領域から「サイズ」で定義されている容量をセクションデータ領域として確保する。   On the other hand, if it is determined that the section address resolution is determined (NO) in determination ST21, the CPU 34 branches to ST23, and the capacity defined by “size” from the free area of the RAM 10 specified by “address” is set as section data. Secure as an area.

次に、CPU34は、処理をST24へ移行させ、セクション定義部の解析結果をRAM10内部のセクション・シンボルテーブル16に登録し、ST25へ進ませセクション定義部解析終了か否かを判定する。判定結果が非(NO)であれば判定ST21へ復帰させ、判定結果が是(YES)であればシンブル定義解析処理ST26へ移行させる。   Next, the CPU 34 shifts the process to ST24, registers the analysis result of the section definition section in the section / symbol table 16 in the RAM 10, advances to ST25, and determines whether or not the section definition section analysis ends. If the determination result is non (NO), the process returns to determination ST21, and if the determination result is good (YES), the process proceeds to the thimble definition analysis process ST26.

CPU34は、解析処理ST26の中のST27を実行し、シンボル定義部を解析し、シンボル値が表現式で与えられる場合はセクションテーブル中のアドレスを使ってアドレス値を計算する。次に、ST28へ進みRAM10内部のセクション・シンボルテーブル16にシンボル名とシンボル値を登録(記憶)する。   The CPU 34 executes ST27 in the analysis process ST26, analyzes the symbol definition section, and calculates an address value using the address in the section table when the symbol value is given by an expression. Next, the process proceeds to ST28, and a symbol name and a symbol value are registered (stored) in the section symbol table 16 in the RAM 10.

CPU34は、処理をST48へ進ませシンボル定義部解析終了か否かを判定する。判定結果が非(NO)であればST27へ復帰させ、判定結果が是(YES)であればデータ部解析処理ST29へ移行させる。   The CPU 34 advances the process to ST48 and determines whether or not the symbol definition unit analysis is finished. If the determination result is non (NO), the process returns to ST27, and if the determination result is good (YES), the process proceeds to the data part analysis process ST29.

CPU34は、解析処理ST29の中のST30を実行し、データ定義部(図1参照)を解析してセクション領域へデータをロードする。また、ロードデータが表現式で与えられる場合はCPU34がシンボル値を使ってデータ値を計算し、RAM10内部にロード後のセクションデータを記憶する。   The CPU 34 executes ST30 in the analysis process ST29, analyzes the data definition unit (see FIG. 1), and loads data into the section area. When the load data is given by an expression, the CPU 34 calculates the data value using the symbol value, and stores the loaded section data in the RAM 10.

CPU34は、ロード処理の段階で、各セクションの先頭からオフセットで指定される位置にロードデータで指定された値をロードする。ロードデータが未解決セクションアドレスあるいは未解決シンボルを参照した計算式の場合は、後述する図3のセクションテーブル110あるいは図4のセクション・シンボルテーブル114中の値を用いて計算する。   The CPU 34 loads the value specified by the load data at the position specified by the offset from the head of each section at the stage of the load process. When the load data is a calculation formula that refers to an unresolved section address or an unresolved symbol, the load data is calculated using values in the section table 110 of FIG. 3 or the section / symbol table 114 of FIG.

CPU34は、処理をST31へ進ませデータ部解析終了か否かを判定する。判定結果が非(NO)であればST30へ復帰させ、判定結果が是(YES)であればデータ転送処理ST32へ移行させる。   The CPU 34 advances the process to ST31 and determines whether or not the data part analysis is finished. If the determination result is non (NO), the process returns to ST30, and if the determination result is good (YES), the process proceeds to the data transfer process ST32.

CPU34は、全セクションデータのロード終了後、データ転送処理ST32を実行し、ホストシステム1側のデータ入力部19へセクション・シンボルテーブル16のすべてのデータを転送し、プログラムローディング処理を終了する。   After loading all the section data, the CPU 34 executes a data transfer process ST32, transfers all the data in the section / symbol table 16 to the data input unit 19 on the host system 1, and ends the program loading process.

なお、セクション・シンボルテーブル16は、セクションテーブルデータ格納領域およびテーブルサイズで構成する。   The section / symbol table 16 includes a section table data storage area and a table size.

図3は、セクションテーブル110の構成図である。マトリクス状のテーブルには、セクション名欄35、セクションサイズ欄36、セクションアドレス欄37が設けられ、ST23(図2参照)の処理で算出された未解決セクションアドレスがすべて記憶されている。   FIG. 3 is a configuration diagram of the section table 110. The matrix table is provided with a section name column 35, a section size column 36, and a section address column 37, and all unresolved section addresses calculated in the process of ST23 (see FIG. 2) are stored.

図4は、セクション・シンボルテーブル114の構成図である。マトリクス状のテーブルには、シンボル名欄38、シンボル値欄39を設けて、リロケータブルオブジェクト中の未解決シンボル名(例えば、シンボルM1、シンボルM2、シンボルM3)のシンボル値(例えば、シンボル値M1、シンボル値M2、シンボル値M3)がすべて記憶されている。   FIG. 4 is a configuration diagram of the section symbol table 114. The matrix table is provided with a symbol name field 38 and a symbol value field 39, and symbol values (for example, symbol value M1, symbol M3, unresolved symbol names in the relocatable object (for example, symbol M1, symbol M2, symbol M3)). All symbol values M2 and M3) are stored.

CPU34は、例えば、図3に示すセクションアドレス欄37の「アドレス」を用いてシンボル値欄39の「シンボル値」を計算(図2のST27)し、RAM10内部のセクション・シンボルテーブル16に記憶(図2の登録処理ST24)する。   The CPU 34 calculates, for example, the “symbol value” in the symbol value column 39 using the “address” in the section address column 37 shown in FIG. 3 (ST27 in FIG. 2), and stores it in the section / symbol table 16 in the RAM 10 ( The registration process ST24 in FIG. 2 is performed.

図5は、第1の実施の形態に用いるターゲットシステム47用のプログラム開発処理のフローチャートである。図1のブロック図及び図5のフローチャートを参照して、プログラム開発のフローを説明する。   FIG. 5 is a flowchart of a program development process for the target system 47 used in the first embodiment. The program development flow will be described with reference to the block diagram of FIG. 1 and the flowchart of FIG.

CPU33は、編集ST40で作成したプログラムソースファイルをプログラム記憶装置17から読出し、ST41でコンパイルしてリロケータブルオブジェクトファイルを作成し、リロケータブルファイル記憶装置2へ記憶する。   The CPU 33 reads the program source file created in editing ST40 from the program storage device 17, compiles it in ST41, creates a relocatable object file, and stores it in the relocatable file storage device 2.

CPU33は、リロケータブルファイル記憶装置2のリロケータブルオブジェクトファイルをターゲットシステム47に転送し、プログラムローダ12を動作させて、プログラムのテスト及びデバッグを実行する(ST42)。   The CPU 33 transfers the relocatable object file in the relocatable file storage device 2 to the target system 47, operates the program loader 12, and executes test and debug of the program (ST42).

ユーザは、プログラムの修正・変更判定ST43で入力部8と出力部7を使用してCPU33に指令を送信し、ST40からST42を繰り返すように、プログラムの修正判定(NO)を実行することができる。   In the program modification / change determination ST43, the user can send a command to the CPU 33 using the input unit 8 and the output unit 7, and execute a program modification determination (NO) so as to repeat ST40 to ST42. .

ユーザは、プログラムの修正・変更判定ST43で、プログラムの構成が固まった判定(YES)結果を、入力部8を使用してCPU33に指令を送信し、プログラムのローディング命令を与える。   In the program modification / change determination ST43, the user transmits a determination (YES) result indicating that the program configuration is fixed to the CPU 33 using the input unit 8, and gives a program loading instruction.

CPU33は、ターゲットシステム47から得られるセクションテーブルデータの情報をリンカ5に与えてリロケータブルオブジェクトをリンクし直しアブソリュートオブジェクファイルをアブソリュートファイル記憶装置4に記憶させる(ST44)。   The CPU 33 gives the information of the section table data obtained from the target system 47 to the linker 5, relinks the relocatable object, and stores the absolute object file in the absolute file storage device 4 (ST44).

ユーザは、アブソリュートファイル記憶装置4に記憶したアブソリュートオブジェクトファイルを磁気記憶装置やフラッシュメモリのような記憶媒体98を使用して、ターゲットシステム47にロードし、アブソリュートオブジェクト形式のプログラムのテストやデバッグを実行する(ST45)。   The user loads the absolute object file stored in the absolute file storage device 4 to the target system 47 using a storage medium 98 such as a magnetic storage device or a flash memory, and executes a test or debug of the program in the absolute object format. (ST45).

なお、ターゲットシステム47へのロードは、データ出力部18を経由して転送してもよいことは勿論である。   Of course, the load to the target system 47 may be transferred via the data output unit 18.

ターゲットシステム47側のCPU34は、アブソリュートオブジェクト形式のプログラムのロードを検知し、プログラムを起動させ判定ST46でプログラムのテスト・デバッグ完了判定(YES)を検出したときはプログラム開発終了に移行し、プログラムの修正・変更が必要と判定(NO)した場合は、処理をST40へ戻し、プログラムの修正又は変更をユーザへ促す。   The CPU 34 on the target system 47 side detects the loading of the program in the absolute object format, starts the program, and moves to the end of program development when the program test / debug completion determination (YES) is detected in the determination ST46. If it is determined that correction / change is necessary (NO), the process returns to ST40 to prompt the user to correct or change the program.

図6は、第1の実施形態に用いるリロケータブルオブジェクトのフォーマットを示す図である。このリロケータブルオブジェクト50には、セクション定義部57とシンボル定義部58とデータ部64が設けられ、リロケータブルファイル記憶装置2(図1参照)に記憶されている。   FIG. 6 is a diagram showing a format of a relocatable object used in the first embodiment. The relocatable object 50 includes a section definition unit 57, a symbol definition unit 58, and a data unit 64, and is stored in the relocatable file storage device 2 (see FIG. 1).

ただし、本発明は、この構成に限定されるものではなく、3種類のパート以外にも他のパートが存在する場合もある。   However, the present invention is not limited to this configuration, and there may be other parts in addition to the three types of parts.

セクション定義部57にはプログラム中の各セクションのセクション名51、セクションのサイズ52、セクションのアドレス53が定義されている。アドレスが解決されている第2段目55の「セクションS2」は、セクションのアドレス53に絶対値アドレスが指定されている。このようなセクションをアブソリュートセクションと定義する。   In the section definition section 57, a section name 51, a section size 52, and a section address 53 of each section in the program are defined. In the “section S2” of the second stage 55 in which the address is resolved, an absolute value address is designated as the section address 53. Such a section is defined as an absolute section.

一方、アドレスが未解決なセクション(例えば、リロケータブルセクション)は、第1段目54の「セクションS1」、第3段目56の「セクションS3」が該当し、セクションアドレスの指定がなく、セクション定義「指定なし」、「指定なし」が共に記述されている。なお、リロケータブルオブジェクトにはリロケータブルセクションが定義されている場合がある。   On the other hand, a section whose address has not been resolved (for example, a relocatable section) corresponds to “section S1” in the first stage 54 and “section S3” in the third stage 56. “None” and “None” are both described. A relocatable section may be defined in the relocatable object.

シンボル定義部58は、プログラム中の各シンボルのシンボル名59、シンボル値60が定義される。リロケータブルセクション中の第1段目61の「シンボルM1」と、第3段目63の「シンボルM3」のシンボル値の定義部には共に、対応するシンボルが配置されるセクションのアドレスを表す計算式が定義されている。   The symbol definition unit 58 defines a symbol name 59 and a symbol value 60 of each symbol in the program. In the symbol value definition part of the “symbol M1” of the first stage 61 and the “symbol M3” of the third stage 63 in the relocatable section, a calculation formula representing the address of the section where the corresponding symbol is arranged Is defined.

例えば、変数R、セクションのインデックスI、及びセクション先頭からのオフセット値Vを用いて、セクションのシンボルSを、変数R(I)にオフセット値Vを加算したアドレスに配置する。   For example, using the variable R, the section index I, and the offset value V from the beginning of the section, the section symbol S is arranged at an address obtained by adding the offset value V to the variable R (I).

なお、計算式M1、M3は、
S=R(I)+V …・・ (1)
の式(1)で定義する。また、第2段目62のアブソリュートセクション中のシンボルM2のシンボル値を絶対値で定義する。
The calculation formulas M1 and M3 are
S = R (I) + V (1)
(1). Further, the symbol value of the symbol M2 in the absolute section of the second stage 62 is defined as an absolute value.

データ部64には、プログラム中の各セクションデータの定義部がセクション毎に設けられる。例えば、セクションS1の定義部65、セクションS2の定義部69、セクションS3の定義部70を設ける。   In the data part 64, a definition part for each section data in the program is provided for each section. For example, a definition unit 65 of section S1, a definition unit 69 of section S2, and a definition unit 70 of section S3 are provided.

セクションS1の定義部65は、各セクションの先頭アドレスからのオフセット66とロードデータ67で構成する。ロードデータ67の定義において、リロケータブルセクションや、未解決のシンボルを参照する場合には、セクションアドレスやシンボル値を表す変数を用いた計算式68を記述する。   The definition section 65 of the section S1 includes an offset 66 from the head address of each section and load data 67. In the definition of the load data 67, when referring to a relocatable section or an unresolved symbol, a calculation formula 68 using a variable representing a section address or a symbol value is described.

リロケータブルオブジェクトは、ターゲットシステム47のRAM10の空き状況に応じてプログラムを動作させることが可能となる。また、プログラム作成者がプログラムのコンパイル時にアドレス解決を行う必要がなくなるので、プログラム開発初期の段階でプログラムのコード、データサイズが流動的に変更される場合に有効である。   The relocatable object can operate a program according to the availability of the RAM 10 of the target system 47. In addition, since it is not necessary for the program creator to perform address resolution at the time of compiling the program, it is effective when the code and data size of the program are dynamically changed in the early stage of program development.

(第2の実施の形態)
図7は、本発明の第2の実施形態に係るプログラムローディング装置のブロック図である。プログラムローディング装置は、第1の実施形態と同様にホストシステム1とターゲットシステム47を備え、重複する構成要素に付いては説明を省略する。
(Second Embodiment)
FIG. 7 is a block diagram of a program loading apparatus according to the second embodiment of the present invention. The program loading apparatus includes the host system 1 and the target system 47 as in the first embodiment, and the description of the overlapping components is omitted.

ホストシステム1内部にリロケータブルオブジェクト形式のプログラムファイルを記憶するリロケータブルファイル記憶装置2を設け、データ出力部18を通してターゲットシステム47のRAM10にリロケータブルオブジェクトファイルを転送する。   A relocatable file storage device 2 for storing a relocatable object format program file is provided inside the host system 1, and the relocatable object file is transferred to the RAM 10 of the target system 47 through the data output unit 18.

ターゲットシステム47のRAM10内部には、リロケータブルオブジェクトセクションデータロード部11が設けられ、リロケータブルオブジェクト形式のプログラムを転送した後に、データ通信部9を通してCPU34へ指令を送信し、ターゲットシステム47のプログラムローダ12aを起動しリロケータブルオブジェクト形式のプログラムをロードする。   In the RAM 10 of the target system 47, a relocatable object section data load unit 11 is provided. After transferring a relocatable object format program, a command is transmitted to the CPU 34 through the data communication unit 9, and the program loader 12a of the target system 47 is loaded. Start and load a relocatable object format program.

プログラムローダ12aは、内部に未解決アドレス決定部13と、セクションデータロード部14と、新たに追加したアブソリュートオブジェクト作成部72を備える。   The program loader 12a includes an unresolved address determination unit 13, a section data load unit 14, and a newly added absolute object creation unit 72 therein.

CPU34は、アブソリュートオブジェクト作成部72を動作させ、セクションデータ記憶装置15に記憶したロード後のセクションデータとセクション・シンボルテーブル16の情報を用いて、アブソリュートオブジェクトファイル73を生成する。   The CPU 34 operates the absolute object creation unit 72 to generate an absolute object file 73 using the section data after loading stored in the section data storage device 15 and the information in the section symbol table 16.

CPU34は、アブソリュートオブジェクトファイル73をホストシステム1側のデータ入力部19経由でアブソリュートファイル記憶装置4に記憶させる。   The CPU 34 stores the absolute object file 73 in the absolute file storage device 4 via the data input unit 19 on the host system 1 side.

CPU34は、アブソリュートオブジェクトファイル73を生成させながら、同時並行的にアブソリュートオブジェクトファイル73の先頭データから順番に、アブソリュートファイル記憶装置4に記憶させることもできる。この場合、ターゲットシステム47のRAM10の容量を少なくすることができるという利点がある。   The CPU 34 can also simultaneously store the absolute object file 73 in the absolute file storage device 4 in order from the top data of the absolute object file 73 while generating the absolute object file 73. In this case, there is an advantage that the capacity of the RAM 10 of the target system 47 can be reduced.

ホストシステム1は、CPU33を操作し、アブソリュートファイル記憶装置4に記憶したアブソリュートオブジェクト形式のプログラム全体をロードパス71及びデータ出力部18を経由させて、ターゲットシステム47のRAM10へ転送する。   The host system 1 operates the CPU 33 to transfer the entire program in the absolute object format stored in the absolute file storage device 4 to the RAM 10 of the target system 47 via the load path 71 and the data output unit 18.

ターゲットシステム47側のCPU34は、アブソリュートオブジェクト形式のプログラムのロードを検知し、プログラムを起動させプログラム完了判定を検出したときはプログラム開発を終了させ、プログラム不具合判定の場合は、プログラム開発のやり直しをユーザに促す。   The CPU 34 on the target system 47 side detects the loading of the program in the absolute object format, starts the program and terminates the program development when the program completion judgment is detected, and in the case of the program malfunction judgment, restarts the program development. Prompt.

図8は、第2の実施形態に用いるプログラムローダ12aの動作フローを示すフローチャートである。図7のブロック図及び図8のフローチャートを参照して、プログラムローダ12aの動作を説明する。まず、CPU34は、ST75でプログラムローダ12a中の未解決アドレス決定部13がリロケータブルオブジェクト形式のプログラム中のセクション定義部(図6参照)を解析する。   FIG. 8 is a flowchart showing an operation flow of the program loader 12a used in the second embodiment. The operation of the program loader 12a will be described with reference to the block diagram of FIG. 7 and the flowchart of FIG. First, in ST75, the unresolved address determination unit 13 in the program loader 12a analyzes the section definition unit (see FIG. 6) in the relocatable object format program in ST75.

CPU34は、セクションアドレスが未解決(例えば、「セクションS1」、「セクションS3」)の場合は、RAM10の空き領域からサイズで定義されているサイズ分をセクションデータ領域として確保し、その領域の先頭アドレスをセクションアドレスに決定する。   When the section address is unresolved (for example, “section S1”, “section S3”), the CPU 34 secures the size defined by the size from the free area of the RAM 10 as the section data area, and starts the head of the area. The address is determined as a section address.

一方、CPU34は、セクションアドレスが解決されている(例えば、「セクションS2」)の場合は、RAM10の空き領域からアドレスで指定されるアドレスからサイズで指定されるサイズ分の領域をセクションデータ領域として確保する。   On the other hand, if the section address has been resolved (for example, “section S2”), the CPU 34 uses, as the section data area, an area for the size specified by the size from the address specified by the address from the free area of the RAM 10. Secure.

CPU34は、ST76で、セクション定義部の解析結果をRAM上のセクションテーブル110(図3参照)に登録(又は記録)する。第2の実施形態でも図3に例示したセクションテーブル110及び図4に例示したセクション・シンボルテーブル114を使用することができるので重複する説明を省略する。   In step ST76, the CPU 34 registers (or records) the analysis result of the section definition section in the section table 110 (see FIG. 3) on the RAM. Also in the second embodiment, the section table 110 illustrated in FIG. 3 and the section symbol table 114 illustrated in FIG. 4 can be used, so redundant description will be omitted.

CPU34は、セクション定義部、シンボル定義部を解析した後に、プログラムローダ12a中のセクションデータロード部14が、リロケータブルオブジェクト中のデータ部を解析して各セクションのデータ領域へデータのロードを実行する(ST77)。   After analyzing the section definition portion and the symbol definition portion, the CPU 34 analyzes the data portion in the relocatable object and loads the data into the data area of each section by the section data load portion 14 in the program loader 12a ( ST77).

CPU34は、ST77で、第1の実施形態と同様に、各セクションの先頭からオフセットで指定される位置にロードデータで指定された値をロードする。   In ST77, the CPU 34 loads the value specified by the load data to the position specified by the offset from the head of each section, as in the first embodiment.

CPU34は、ST78で、ロードデータが未解決セクションアドレスあるいは未解決シンボルを参照した計算式の場合は、セクションテーブル若しくはシンボルテーブル中の値を用いて計算しロードデータを求めセクション定義部を作成する。   If the load data is a calculation formula referring to an unresolved section address or an unresolved symbol in ST78, the CPU 34 calculates the load data by using a value in the section table or symbol table, and creates a section definition section.

CPU34は、ST79で、セクション定義部の情報に基づき、全セクションデータのロードを完了させ、データ定義部を完成させてから、ST80へ遷移する。   In step ST79, the CPU 34 completes loading of all section data based on the information in the section definition section, completes the data definition section, and then proceeds to ST80.

CPU34は、ST80で、アブソリュートオブジェクトファイル73の格納領域の容量を算出する。例えば、セクションテーブルデータに登録されているセクション数と全セクションサイズから算出することができる。   In ST80, the CPU 34 calculates the capacity of the storage area of the absolute object file 73. For example, it can be calculated from the number of sections registered in the section table data and the total section size.

CPU34は、ST80で、プログラムローダ12a中のアブソリュートオブジェクト作成部72がRAM10の内部にアブソリュートオブジェクトファイル73の格納領域を確保し、生成したアブソリュートオブジェクトファイル73を記憶する。   In ST80, the absolute object creation unit 72 in the program loader 12a secures a storage area for the absolute object file 73 in the RAM 10 and stores the generated absolute object file 73 in ST80.

CPU34は、ST80で、セクション・シンボルテーブル16のデータ情報をアブソリュートオブジェクトファイル73内部のセクション定義部に対応するフォーマットへ変換し、アブソリュートオブジェクトファイル73の格納領域へ転送しセクション定義部を完成させる。   In ST80, the CPU 34 converts the data information in the section / symbol table 16 into a format corresponding to the section definition section in the absolute object file 73, transfers it to the storage area of the absolute object file 73, and completes the section definition section.

CPU34は、セクション定義部完成後、ST80で、各セクションのロード後のセクションデータをアブソリュートオブジェクトファイル73内部のデータ部に対応するフォーマットに変換し、アブソリュートオブジェクトファイル73の格納領域へ転送してデータ定義部を完成させる。   After completion of the section definition section, the CPU 34 converts the section data after loading each section into a format corresponding to the data section in the absolute object file 73 and transfers it to the storage area of the absolute object file 73 to define the data. Complete the department.

CPU34は、ST80で、データ定義部を完成させた後に、プログラムローダ12aを動作させ。ホストシステム1側のデータ入力部19を通して、アブソリュートファイル記憶装置4へアブソリュートオブジェクトファイルを転送し記憶させることができる。   The CPU 34 operates the program loader 12a after completing the data definition section in ST80. The absolute object file can be transferred and stored in the absolute file storage device 4 through the data input unit 19 on the host system 1 side.

また、アブソリュートオブジェクトファイル73を構成するセクション定義部及びデータ部のデータ情報を分割しながらホストシステム1側へ転送してもよい。この場合、ターゲットシステム47のRAM10の容量に余裕ができるという利点がある。   Further, the data information of the section definition part and the data part constituting the absolute object file 73 may be transferred to the host system 1 side while being divided. In this case, there is an advantage that the capacity of the RAM 10 of the target system 47 can be afforded.

すべてのアブソリュートオブジェクトファイル73を転送した段階でプログラムローディング処理を終了させることができる。   When all the absolute object files 73 have been transferred, the program loading process can be terminated.

図9は、アブソリュートオブジェクトファイル73のフォーマット変換処理のブロック図である。   FIG. 9 is a block diagram of the format conversion process of the absolute object file 73.

オブジェクトデータ85は、CPU34がセクション・シンボルテーブル16のセクションテーブルのデータをアブソリュートオブジェクトファイル73内部のセクション定義部86のフォーマットへ変換したデータであり、セクション定義部86は、セクション名87、サイズ88、アドレス89で構成されている。   The object data 85 is data obtained by the CPU 34 converting the data in the section table of the section / symbol table 16 into the format of the section definition unit 86 in the absolute object file 73. The section definition unit 86 includes a section name 87, a size 88, An address 89 is used.

ロード後のセクションデータ15aは、CPU34がセクションデータをアブソリュートオブジェクトファイル73内部のデータ定義部90のフォーマットへ変換したデータである。   The loaded section data 15 a is data obtained by the CPU 34 converting the section data into the format of the data definition unit 90 inside the absolute object file 73.

セクションデータ15aは、セクションS1の先頭アドレス15bから絶対値S11、S12、S13のデータに変換され、セクションS2の先頭アドレス15cも同様に絶対値のデータに変換され、セクションS3の先頭アドレス15dも同様に絶対値のデータに変換されている。   The section data 15a is converted from the head address 15b of the section S1 to data of absolute values S11, S12, and S13. The head address 15c of the section S2 is also converted to absolute value data, and the head address 15d of the section S3 is also the same. Has been converted to absolute value data.

アブソリュートオブジェクトファイル73のデータ定義部90は、CPU34を経由してセクションデータ15aが対応する格納領域にオフセット91aとロードデータ91bが書込まれる。   The data definition unit 90 of the absolute object file 73 writes the offset 91a and the load data 91b to the storage area corresponding to the section data 15a via the CPU 34.

例えば、オフセット91aにセクションS1の先頭アドレス15bに対応する「オフセットS11」のロードデータ「絶対値S11」がCPU34を介して書込まれ、「オフセットS12」のロードデータ「絶対値S12」がCPU34を介して書込まれ、「オフセットS13」のロードデータ「絶対値S13」がCPU34を介して書込まれる。   For example, the load data “absolute value S11” of “offset S11” corresponding to the head address 15b of the section S1 is written to the offset 91a via the CPU 34, and the load data “absolute value S12” of “offset S12” is stored in the CPU 34. The load data “absolute value S13” of “offset S13” is written via the CPU 34.

また、「セクションS2」91cの「先頭アドレスS2」15c、「セクションS3」91dの「先頭アドレスS3」15dも同様に、オフセットと絶対値が対応つけられてCPU34によって書込まれるように構成されている。   Similarly, the “start address S2” 15c of the “section S2” 91c and the “start address S3” 15d of the “section S3” 91d are configured to be written by the CPU 34 with the offset and the absolute value associated with each other. Yes.

図10は、第2の実施の形態に用いるプログラム開発のフローチャートである。ST92、ST93、ST94、ST95、ST97はすべて、第1の実施形態のソースファイル編集ST40、コンパイルST41、テスト・デバッグST42、判定ST43、判定ST46と同一であり重複する説明を省略する。   FIG. 10 is a flowchart of program development used in the second embodiment. ST92, ST93, ST94, ST95, and ST97 are all the same as the source file editing ST40, compilation ST41, test / debug ST42, determination ST43, and determination ST46 of the first embodiment, and redundant description is omitted.

第2の実施形態では、アブソリュートオブジェクト形式のプログラムをアブソリュートファイル記憶装置4(図7参照)からターゲットシステム47へデータ出力部18(図7参照)を経由してロードしてから、テスト・デバッグST96でターゲットシステム47側のCPU34が、ロードしたプログラムを起動させる。   In the second embodiment, the absolute object format program is loaded from the absolute file storage device 4 (see FIG. 7) to the target system 47 via the data output unit 18 (see FIG. 7), and then the test / debug ST96 is performed. Then, the CPU 34 on the target system 47 side activates the loaded program.

第2の実施形態のホストシステム1は、起動したターゲットシステム47側のプログラムのテスト及びデバッグをホストシステム1側の入力部8及び出力部7を用いてデータ通信部9を経由して実行することができる点が第1の実施形態と相違するので、リンカ5(図1参照)やセクションデータ記憶装置3(図1参照)を必要としない点で第1の実施形態より有利である。   The host system 1 according to the second embodiment executes the test and debug of the activated target system 47 side program via the data communication unit 9 using the input unit 8 and output unit 7 on the host system 1 side. Since this is different from the first embodiment, it is advantageous over the first embodiment in that the linker 5 (see FIG. 1) and the section data storage device 3 (see FIG. 1) are not required.

以上のようなプログラムローダ12又は12aによれば、ターゲットシステム47で、リロケータブルオブジェクトファイルを受け、未解決アドレスを決定することにより、ICEのような特別な装置を使用せずに、簡易デバッグを行うことができる。   According to the program loader 12 or 12a as described above, the target system 47 receives a relocatable object file and determines an unresolved address, thereby performing simple debugging without using a special device such as ICE. be able to.

また、リロケータブルオブジェクトファイルの各シンボルのロードアドレス情報よりプログラムローダ12、12aが各シンボルの配置アドレスを決定し、ロード後のセクションデータ処理を行うことができる。   Further, the program loaders 12 and 12a can determine the arrangement address of each symbol from the load address information of each symbol of the relocatable object file, and can perform section data processing after loading.

さらに、プログラムローダ12、12aが、シンボルテーブルを作成することにより、各シンボル毎のターゲットシステム47上へのきめ細かなシンボル配置や、ICEのような特別な装置を使用せずに容易に簡易デバッグが実行でき、ターゲットシステム47のデバッグ効率を向上させることができる。   Furthermore, by creating a symbol table, the program loaders 12 and 12a can easily perform simple debugging without using a detailed symbol arrangement on the target system 47 for each symbol or using a special device such as ICE. The debugging efficiency of the target system 47 can be improved.

しかも、ホストシステム1から余分なデータを削除したアブソリュートオブジェクト形式のプログラムをターゲットシステム47へ転送するので、転送速度が向上し、ターゲットシステム47のRAM容量を削減することができる。   In addition, since the absolute object format program from which excess data is deleted from the host system 1 is transferred to the target system 47, the transfer speed is improved and the RAM capacity of the target system 47 can be reduced.

なお、本発明の実施形態に記載された、作用及び効果は、本発明から生じる最も好適な作用及び効果を列挙したに過ぎず、本発明による作用及び効果は、本発明の実施の形態に記載されたものに限定されるものではない。   Note that the actions and effects described in the embodiments of the present invention only list the most preferable actions and effects resulting from the present invention, and the actions and effects according to the present invention are described in the embodiments of the present invention. It is not limited to what was done.

本発明の第1の実施形態に係るプログラムローディング装置のブロック図。1 is a block diagram of a program loading apparatus according to a first embodiment of the present invention. 第1の実施形態に用いるプログラムローディング処理のフローチャート。The flowchart of the program loading process used for 1st Embodiment. 各実施形態に用いるセクションテーブルの構成図。The block diagram of the section table used for each embodiment. 各実施形態に用いるセクションテーブルの構成図。The block diagram of the section table used for each embodiment. 第1の実施の形態に用いるプログラム開発処理のフローチャート。The flowchart of the program development process used for 1st Embodiment. 第1の実施形態に用いるリロケータブルオブジェクトのフォーマット。The format of the relocatable object used in the first embodiment. 本発明の第2の実施形態に係るプログラムローディング装置のブロック図。The block diagram of the program loading apparatus which concerns on the 2nd Embodiment of this invention. 第2の実施形態に用いるプログラムロディング処理のフローチャート。The flowchart of the program loading process used for 2nd Embodiment. 第2の実施形態に用いるフォーマット変換処理のブロック図。The block diagram of the format conversion process used for 2nd Embodiment. 第2の実施の形態に用いるプログラム開発のフローチャート。The flowchart of the program development used for 2nd Embodiment.

符号の説明Explanation of symbols

1…ホストシステム
2…リロケータブルファイル記憶装置
3…セクションデータ記憶装置
4、4a…アブソリュートファイル記憶装置
5…リンカ
7…出力部
8…入力部
9…データ通信部
10…ランダムアクセスメモリ
11…リロケータブルオブジェクトセクションデータロード部
12、12a…プログラムローダ
13…未解決アドレス決定部
14…セクションデータロード部
16…セクション・シンボルテーブル
17…プログラム記憶装置
18…データ出力部
19…データ入力部
33、34…中央処理装置
47…ターゲットシステム
71…ロードパス
72…アブソリュートオブジェクト作成部
86…セクション定義部
90…データ定義部
110…セクションテーブル
114…セクション・シンボルテーブル
DESCRIPTION OF SYMBOLS 1 ... Host system 2 ... Relocatable file storage device 3 ... Section data storage device 4, 4a ... Absolute file storage device 5 ... Linker 7 ... Output part 8 ... Input part 9 ... Data communication part 10 ... Random access memory 11 ... Relocatable object section Data load unit 12, 12a ... Program loader 13 ... Unresolved address determination unit 14 ... Section data load unit 16 ... Section symbol table 17 ... Program storage device 18 ... Data output unit 19 ... Data input unit 33, 34 ... Central processing unit 47 ... Target system 71 ... Load path 72 ... Absolute object creation part 86 ... Section definition part 90 ... Data definition part 110 ... Section table 114 ... Section symbol table

Claims (5)

プログラムのリロケータブルオブジェクトファイルを記憶するリロケータブルファイル記憶装置と、
前記リロケータブルファイル記憶装置から読出したリロケータブルオブジェクトファイルをターゲットシステムに転送するデータ出力部と、
前記ターゲットシステムからデータ入力部を通して転送されるセクションテーブルデータを記憶するセクションデータ記憶装置と、
前記リロケータブルファイル記憶装置及び前記セクションデータ記憶装置に接続し、前記リロケータブルオブジェクトファイルと前記セクションテーブルデータを読出して、プログラムのアブソリュートオブジェクトファイルを生成するリンカと、
前記リンカで生成されたアブソリュートオブジェクトファイルを記憶するアブソリュートファイル記憶装置と、
前記リロケータブルファイル記憶装置、セクションデータ記憶装置、及びアブソリュートファイル記憶装置と前記リンカを制御する中央処理装置と、
を備えることを特徴とするプログラムローディング装置。
A relocatable file storage device for storing a relocatable object file of the program;
A data output unit for transferring a relocatable object file read from the relocatable file storage device to a target system;
A section data storage device for storing section table data transferred from the target system through a data input unit;
A linker that connects to the relocatable file storage device and the section data storage device, reads the relocatable object file and the section table data, and generates an absolute object file of the program;
An absolute file storage device for storing an absolute object file generated by the linker;
A central processing unit for controlling the relocatable file storage device, section data storage device, absolute file storage device and the linker;
A program loading apparatus comprising:
前記中央処理装置は、入力部から入力されたプログラムローダ起動命令をデータ通信部を通して前記ターゲットシステムへ転送し、前記ターゲットシステムのメモリ内のプログラムローダを起動させ、前記リロケータブルファイル記憶装置から前記データ出力部を通して転送された前記リロケータブルオブジェクトファイルのテスト結果を、前記中央処理装置に接続した出力部へ出力することを特徴とする請求項1に記載のプログラムローディング装置。   The central processing unit transfers a program loader start command input from an input unit to the target system through a data communication unit, starts a program loader in the memory of the target system, and outputs the data from the relocatable file storage device 2. The program loading apparatus according to claim 1, wherein a test result of the relocatable object file transferred through a central processing unit is output to an output unit connected to the central processing unit. プログラムのリロケータブルオブジェクトファイルを記憶するリロケータブルファイル記憶装置と、
前記リロケータブルファイル記憶装置から読出したリロケータブルオブジェクトファイルをターゲットシステムに送信するデータ出力部と、
前記ターゲットシステムからデータ入力部を通して転送されるプログラムのアブソリュートオブジェクトファイルを記憶するアブソリュートファイル記憶装置と、
前記アブソリュートファイル記憶装置から読出した前記アブソリュートオブジェクトファイルを前記データ出力部を経由して前記ターゲットシステムに転送させるロードパスと、
前記リロケータブルファイル記憶装置及びアブソリュートファイル記憶装置を制御する中央処理装置と、
を備えることを特徴とするプログラムローディング装置。
A relocatable file storage device for storing a relocatable object file of the program;
A data output unit for transmitting a relocatable object file read from the relocatable file storage device to a target system;
An absolute file storage device for storing an absolute object file of a program transferred from the target system through a data input unit;
A load path for transferring the absolute object file read from the absolute file storage device to the target system via the data output unit;
A central processing unit for controlling the relocatable file storage device and the absolute file storage device;
A program loading apparatus comprising:
前記中央処理装置は、入力部から入力されたプログラムローダ起動命令をデータ通信部を通して前記ターゲットシステムへ転送し、前記ターゲットシステムのメモリ内のプログラムローダを起動させ、前記リロケータブルファイル記憶装置から前記データ出力部を通して転送された前記リロケータブルオブジェクトファイルのテスト結果を、前記中央処理装置に接続した出力部へ出力することを特徴とする請求項3に記載のプログラムローディング装置。   The central processing unit transfers a program loader start command input from an input unit to the target system through a data communication unit, starts a program loader in the memory of the target system, and outputs the data from the relocatable file storage device 4. The program loading device according to claim 3, wherein the test result of the relocatable object file transferred through a unit is output to an output unit connected to the central processing unit. 中央処理装置がプログラムのソースファイルをソースファイル記憶装置に記憶するソースファイル記憶工程と、
前記中央処理装置が前記ソースファイル記憶装置からソースファイルを読出してコンパイルしたプログラムのリロケータブルオブジェクトファイルをリロケータブルファイル記憶装置に記憶するリロケータブルファイル記憶工程と、
前記中央処理装置が前記リロケータブルファイル記憶装置からターゲットシステムへリロケータブルオブジェクトファイルを転送し、リロケータブルオブジェクトファイルのテスト及びデバッグを実行するデバッグ工程と、
前記中央処理装置が前記デバッグ工程で前記リロケータブルオブジェクトファイルのテストを完了させた段階で、前記ターゲットシステム側で生成されるプログラムのアブソリュートオブジェクトファイルをアブソリュートファイル記憶装置に記憶するアブソリュートファイル記憶工程と、
前記中央処理装置が前記アブソリュートファイル記憶装置からアブソリュートオブジェクトファイルを読出して、前記ターゲットシステムへ転送しプログラムのテストをするテスト工程と、
を備えることを特徴とするプログラムローディング方法。
A source file storage step in which a central processing unit stores a source file of a program in a source file storage device;
A relocatable file storage step of storing in the relocatable file storage device a relocatable object file of a program compiled by the central processing unit reading the source file from the source file storage device;
A debugging step in which the central processing unit transfers a relocatable object file from the relocatable file storage device to a target system, and tests and debugs the relocatable object file;
An absolute file storage step of storing an absolute object file of a program generated on the target system side in an absolute file storage device when the central processing unit completes the test of the relocatable object file in the debugging step;
A test step in which the central processing unit reads an absolute object file from the absolute file storage device, transfers it to the target system, and tests a program;
A program loading method comprising:
JP2004100763A 2004-03-30 2004-03-30 Method and system for loading program Pending JP2005284963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004100763A JP2005284963A (en) 2004-03-30 2004-03-30 Method and system for loading program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004100763A JP2005284963A (en) 2004-03-30 2004-03-30 Method and system for loading program

Publications (1)

Publication Number Publication Date
JP2005284963A true JP2005284963A (en) 2005-10-13

Family

ID=35183246

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004100763A Pending JP2005284963A (en) 2004-03-30 2004-03-30 Method and system for loading program

Country Status (1)

Country Link
JP (1) JP2005284963A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008158846A (en) * 2006-12-25 2008-07-10 Toshiba Mitsubishi-Electric Industrial System Corp Plant controller
JP2018511132A (en) * 2015-12-25 2018-04-19 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド Application loading method and apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008158846A (en) * 2006-12-25 2008-07-10 Toshiba Mitsubishi-Electric Industrial System Corp Plant controller
JP2018511132A (en) * 2015-12-25 2018-04-19 バイドゥ オンライン ネットワーク テクノロジー (ベイジン) カンパニー リミテッド Application loading method and apparatus

Similar Documents

Publication Publication Date Title
US6243864B1 (en) Compiler for optimizing memory instruction sequences by marking instructions not having multiple memory address paths
JP5039031B2 (en) Method and apparatus for executing native code and target code in combination during program code conversion
JP2000242501A (en) Information processor, information processing method and program writing device
US10884715B2 (en) Method for generating source code
JP4041248B2 (en) COMPILER DEVICE, COMPUTER-READABLE RECORDING MEDIUM CONTAINING COMPILING PROGRAM, AND COMPILING METHOD
JP6550269B2 (en) PROGRAM CREATION SUPPORT DEVICE, CONTROL METHOD, AND PROGRAM
JP6984565B2 (en) Information processing equipment and programs
US20210096830A1 (en) Incremental code generation method
JP2005284963A (en) Method and system for loading program
JP2005174045A (en) Source program conversion device, source program conversion method, source program conversion program and program recording medium
JP4503203B2 (en) Method and apparatus for creating test program for evaluating information processing apparatus, and program describing processing for the same
JP5120103B2 (en) Debugging method and debugging program
WO2011045949A1 (en) Memory management method, memory management program, and information processing device
JP6812637B2 (en) Programmable controller system, its development support device, target device
JP5067705B2 (en) Abnormal test support device, abnormal test support method, and program
JPH0228174B2 (en)
KR101099491B1 (en) Method for analyzing power consumption
JP2005115619A (en) Program debugger
JP4371000B2 (en) IDL compiling device, IDL compiling method, and IDL compiler
JP2007114934A (en) Compiler system
JP5109808B2 (en) Additional executable information generating apparatus, information processing apparatus, and program
JP5208706B2 (en) Code execution system, method and program
JP2003076547A (en) System and method for automatically generating control software
JP2009515243A (en) Method for generating a simulation program executable on a host computer
JPH11282693A (en) Mcu simulation device, its simulation method and computer redable recording medium recording simulation program