JPH0540613A - Link system with sum checking data - Google Patents

Link system with sum checking data

Info

Publication number
JPH0540613A
JPH0540613A JP3194657A JP19465791A JPH0540613A JP H0540613 A JPH0540613 A JP H0540613A JP 3194657 A JP3194657 A JP 3194657A JP 19465791 A JP19465791 A JP 19465791A JP H0540613 A JPH0540613 A JP H0540613A
Authority
JP
Japan
Prior art keywords
data
code data
program code
value
program
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
JP3194657A
Other languages
Japanese (ja)
Inventor
Hiroko Endo
宏子 遠藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP3194657A priority Critical patent/JPH0540613A/en
Publication of JPH0540613A publication Critical patent/JPH0540613A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE:To confirm the invariability and the propriety of the program code data by confirming the sum checking data with the padding calculation when the program code data is finally decided and the practicable program code data is produced. CONSTITUTION:An absolute value production means 10 secures the connection among plural program code data codes 5a-5c that can be rearranged and replaces the data and command codes with the unique relative value code data. Then, an initial value production means 20 replaces the initial value secured with an area securing instruction with the fixed value (f). Furthermore a sum checking data calculation means 30 produces the correction value data so that the computing result obtained by adding successively the program code data decided by both means 10 and 20 from the first through the end of the data is equal to (x). Then, a sum checking data padding means 40 adds the sum checking data to the end of the program code data.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、サムチェックデータ付
きリンク方式に関し、特に複数の再配置可能なプログラ
ムコードデータを結合し、一意の相対値コードデータに
変換し、実行可能なプログラムコードデータを作成す
る、プログラムリンク方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a sum check data-attached link system, and in particular, a plurality of relocatable program code data are combined and converted into unique relative value code data, and executable program code data is converted. The program link method to be created.

【0002】[0002]

【従来の技術】従来、この種のプログラムのリンクと
は、再配置可能な個々のプログラムを結合し、一意の相
対値アドレスを与え1つの実行可能なプログラムデータ
コードとし、主記憶上のどこに配置するかという情報を
もとにして、矛盾なくプログラムが実行できるような、
プログラムコードデータの最終形態を作成する作業とい
える。一般に、プログラム作成過程の最終段階に行わ
れ、リンク後はプログラムコードデータが変化すること
は無い。いいかえれば、プログラムコードデータはこの
段階で決定されるといえる。
2. Description of the Related Art Conventionally, this kind of program link is a combination of individual relocatable programs, a unique relative value address is given to form one executable program data code, and the program is placed anywhere in the main memory. Based on the information whether to do, so that the program can be executed consistently,
It can be said that this is the work of creating the final form of the program code data. Generally, it is performed at the final stage of the program creation process, and the program code data does not change after linking. In other words, it can be said that the program code data is decided at this stage.

【0003】[0003]

【発明が解決しようとする課題】一般に、プログラム
は、初期値を持たない領域確保のみを目的とするコード
データでない限り、そのコードデータが1バイトでも書
き変わってしまえば本来の正しい動作が行われなくなっ
てしまう。例えば、プログラムコードデータを格納して
おく記憶謀体内でデータの破壊が起き、プログラムコー
ドデータが書き変わってしまった場合や、主記憶に障害
が発生しており記憶媒体上から主記憶上にプログラムコ
ードデータが正しく展開できなかった場合には、このプ
ログラムを実行させても、本来のプログラムの機能を果
たすことができなくなる。それだけプログラムのコード
データは、不変性を要求されるものといえる。
Generally, unless the code data is intended to secure an area having no initial value and the code data is rewritten even by one byte, the original correct operation is performed. It will be gone. For example, if the program code data is rewritten due to data destruction in the memory device that stores the program code data, or if the main memory is faulty and the program is transferred from the storage medium to the main memory. If the code data cannot be expanded correctly, the original program function cannot be achieved even if this program is executed. Therefore, it can be said that the code data of a program is required to be invariant.

【0004】しかしながら、主記憶上に展開したプログ
ラムコードデータが、本来のプログラムコードデータか
ら書き変わっていないことを確認する手段が無いという
問題がある。
However, there is a problem that there is no means for confirming that the program code data expanded in the main memory has not been rewritten from the original program code data.

【0005】[0005]

【課題を解決するための手段】本発明のサムチェックデ
ータ付きリンク方式は、複数の再配置可能なプログラム
コードデータを、一意の相対値コードデータに置き換え
る相対値コードデータ作成手段と、領域を確保する命令
で確保されている初期値の定まっていない不定値領域を
固定値‘f’で置き換える初期値作成手段、前記の絶対
値コードデータ作成手段及び、初期値作成手段で決定さ
れたプログラムコードデータをコードデータの最初から
最後まで順次足し込んだ演算結果がxになるような補正
値データを作成する、サムチェックデータ計算手段、及
びサムチェックデータをプログラムコードデータの最後
に付け加える、サムチェックデータ埋め込み手段を有し
ている。
In the link method with sum check data of the present invention, a relative value code data creating means for replacing a plurality of relocatable program code data with unique relative value code data and an area are secured. The indefinite value area in which the initial value is not determined, which is secured by the instruction, is replaced by the fixed value'f ', the initial value creating means, the absolute value code data creating means, and the program code data determined by the initial value creating means. To generate correction value data such that the operation result is x from the beginning to the end of the code data, sum check data calculation means, and add the sum check data to the end of the program code data, embed the sum check data Have means.

【0006】[0006]

【実施例】次に本発明について図面を参照して説明す
る。
The present invention will be described below with reference to the drawings.

【0007】図1は、本発明の一実施例を示すブロック
図である。図1おいて、本発明の一実施例は、相対値コ
ードデータ作成手段10、初期値作成手段20、サムチ
ェックデータ計算手段30、及び、サムチェックデータ
をプログラムのコードデータの最後に付け加えるサムチ
ェックデータ埋め込み手段40で構成されている。
FIG. 1 is a block diagram showing an embodiment of the present invention. In FIG. 1, one embodiment of the present invention is a sum check for adding relative value code data creating means 10, initial value creating means 20, sum check data calculating means 30 and sum check data to the end of the code data of a program. The data embedding unit 40 is used.

【0008】再配置可能プログラムコードデータ5a,
5b,5cは、リンクされるまでその相対値コードが確
定しないオペランドコードと、初期値が与えられず領域
のみ確保されている部分を含む別個のプログラムコード
データである。これに対し、相対値プログラムコードデ
ータ50は、リンクにより、再配置可能プログラムコー
ドデータである5a,5b,5cを結合してできた、す
べてのコードデータが一意に決定にされた後のプログラ
ムコードである。
Relocatable program code data 5a,
5b and 5c are separate program code data including an operand code whose relative value code is not fixed until linked and a portion where an initial value is not given and only an area is secured. On the other hand, the relative value program code data 50 is the program code after all the code data is uniquely determined by linking the relocatable program code data 5a, 5b, 5c. Is.

【0009】相対値コードデータ作成手段10は、再配
置可能プログラムコードデータ5a,5b,5cのリン
クするまで確定できなかったオペランドコードを、与え
られたアドレス情報を基に、決定することを行い領域確
保命令を除いたオペランドコードが一意に決定される。
The relative value code data creating means 10 determines the operand code which cannot be determined until the relocatable program code data 5a, 5b, 5c are linked, based on the given address information, and the area The operand code excluding the reserved instruction is uniquely determined.

【0010】次に、初期値作成手段20で、同じく再配
置可能プログラムコードデータ5a,5b,5cの領域
確保命令で確保されている領域を検索し、確保されてい
るデータ長分を固定値‘f’で置き換える。本実施例で
は、仮にデータ‘0’とする。
Next, the initial value creating means 20 searches the area reserved by the area reserving instruction of the relocatable program code data 5a, 5b, 5c, and the secured data length is a fixed value '. Replace with f '. In this embodiment, it is assumed that the data is "0".

【0011】前述の、絶対値コードデータ作成手段10
と、初期値作成手段20とで、すべてのプログラムコー
ドデータは、一つのプログラムとして一意の値を持つ絶
対値コードエータに変換されたことになり、相対値プロ
グラムコードデータ50が生成される。
The absolute value code data creating means 10 described above.
Then, the initial value creating means 20 converts all the program code data into absolute value code data having a unique value as one program, and the relative value program code data 50 is generated.

【0012】次に、サムチェックデータ計算手段30
で、絶対値プログラムコードデータ30のコードデータ
を最初から最後まで順次足し込んでいきその合計値dを
算出すること計算値dと、
Next, the sum check data calculation means 30
Then, add the code data of the absolute value program code data 30 sequentially from the beginning to the end, and calculate the total value d thereof.

【0013】 [0013]

【0014】となるようなdの補正値d−barを求め
る。
A correction value d-bar for d such that

【0015】本実施例では、xを仮に‘0’として、In this embodiment, x is assumed to be "0",

【0016】 [0016]

【0017】この様にして求められたサムチェックデー
タをサムチェックデータ埋け込み手段40で、コードデ
ータの最後に付く加える。
The sum check data thus obtained is added to the end of the code data by the sum check data embedding means 40.

【0018】以上の様にして補正値データを付け加えた
コードデータは、そのままの形で、ローダーにより、主
記憶上に展開される。従って、ロード終了時に、コード
データの最初から補正値データまで順次足し込んでい
き、その演算結果が0になることを確認することで、プ
ログラムが正しく、二次記憶の媒体内に格納されていた
こと、及びプログラムが正しく主記憶上に展開されてい
ることを、確認することがきる。
The code data to which the correction value data is added as described above is expanded in the main memory by the loader as it is. Therefore, at the end of loading, the correction data is added sequentially from the beginning of the code data, and by confirming that the calculation result becomes 0, the program was correctly stored in the secondary storage medium. And that the program is correctly expanded in the main memory.

【0019】尚、一般にROMに書き込まれたコードデ
ータ等は、サムチェックデータ計算方式30と同様な方
式でサムチェックデータをROM内に埋め込み、これを
利用してROM内のデータの不変性を確認することが行
われている。
Generally, the code data written in the ROM is embedded with the sum check data in the ROM by the same method as the sum check data calculation method 30, and this is used to confirm the invariance of the data in the ROM. Is being done.

【0020】[0020]

【発明の効果】以上説明したように本発明は、プログラ
ムコードデータが最終的に決定され、実行可能なプログ
ラムコードデータが作成されるリンク時に、そのプログ
ラムコードデータのサムチェックデータを埋め込み、サ
ムチェックデータを計算で確認することにより、プログ
ラム実行時の主記憶展開時に、そのプログラムコードデ
ータの不変性及び、正当性を確証できるという効果があ
る。
As described above, according to the present invention, the sum check data of the program code data is embedded at the time of linking when the program code data is finally determined and the executable program code data is created. By confirming the data by calculation, there is an effect that the invariance and correctness of the program code data can be confirmed when the main memory is expanded during the execution of the program.

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

【図1】本発明の一実施例を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of the present invention.

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

10 絶対値コードデータ作成手段 20 初期値作成手段 30 サムチェックデータ計算手段 40 サムチェックデータ埋め込み手段 5a 再配置可能プログラムデータコード 5b 再配置可能プログラムデータコード 5c 再配置可能プログラムデータコード 50 絶対値プログラムコードデータ 100 処理の流れ 200 作用の流れ 10 Absolute value code data creating means 20 Initial value creating means 30 Sum check data calculating means 40 Sum check data embedding means 5a Relocatable program data code 5b Relocatable program data code 5c Relocatable program data code 50 Absolute value program code Data 100 Processing flow 200 Action flow

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数の再配置可能なプログラムコードデ
ータを結合し、データ及びコマンドコードを一意の相対
値コードデータに置き換える相対値コードデータ作成手
段、領域を確保する命令で確保されている初期値の定ま
っていない不定値領域を固定値‘f’で置き換える初期
値作成手段、前記絶対値コードデータ作成手段と初期値
作成手段で決定されたプログラムコードデータを、デー
タの最初から最後まで順次足し込んだ演算結果がxにな
るように補正値データを作成する、サムチェックデータ
計算手段、及びサムチェックデータをプログラムコード
データの最後に付け加える、サムチェックデータ埋め込
み手段を有することを特徴とするサムチェックデータ付
きリンク方式。
1. Relative value code data creating means for combining a plurality of relocatable program code data and replacing the data and command code with unique relative value code data, and an initial value secured by an instruction to secure an area. Initial value creating means for replacing an undefined indeterminate value area with a fixed value'f ', and program code data determined by the absolute value code data creating means and the initial value creating means are sequentially added from the beginning to the end of the data. Sum check data including a sum check data calculation unit for creating correction value data so that the calculation result is x, and a sum check data embedding unit for adding the sum check data to the end of the program code data. Link system.
JP3194657A 1991-08-05 1991-08-05 Link system with sum checking data Pending JPH0540613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3194657A JPH0540613A (en) 1991-08-05 1991-08-05 Link system with sum checking data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3194657A JPH0540613A (en) 1991-08-05 1991-08-05 Link system with sum checking data

Publications (1)

Publication Number Publication Date
JPH0540613A true JPH0540613A (en) 1993-02-19

Family

ID=16328155

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3194657A Pending JPH0540613A (en) 1991-08-05 1991-08-05 Link system with sum checking data

Country Status (1)

Country Link
JP (1) JPH0540613A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000065455A1 (en) * 1999-04-22 2000-11-02 Matsushita Electric Industrial Co., Ltd. Processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000065455A1 (en) * 1999-04-22 2000-11-02 Matsushita Electric Industrial Co., Ltd. Processor

Similar Documents

Publication Publication Date Title
US5815714A (en) Embedded debug commands in a source file
US7055035B2 (en) Method for generating a read only memory image
US5559884A (en) Method and system for generating and auditing a signature for a computer program
US6976221B2 (en) System and method for flexible software linking
EP0697652A1 (en) Method for re-executing a process on a computer system for fault correction
WO2021208288A1 (en) Program implementation method and system capable of separating code and configuration data
EP0633526A2 (en) Language processing system and method therefor
CN113590227A (en) Binary programming format loading method and system under embedded system
US7269828B2 (en) Method for safely instrumenting large binary code
JPH0540613A (en) Link system with sum checking data
Yin et al. Formal verification by reverse synthesis
JP4888790B2 (en) Contract definition function verification apparatus, method and program thereof
JP2016128941A (en) Output determination device, output determination method, output determination program, and static analysis device
US20040010500A1 (en) Method, apparatus and article of manufacture to aggregate automated transaction procession
KR101120989B1 (en) Method and system for generating standardized source etl program, recording medium and data-etl-method using the method
JP2001060240A (en) Format correcting method and data converting method
JP2020194338A (en) Software development assisting device and software development assisting program
US20080098350A1 (en) Method of generating c code on the basis of uml specifications
KR100403747B1 (en) Method for correcting program of memory
JPH11194933A (en) File verification method
JP2016151973A (en) Management control system, development support device therefor, and management device
JP2989971B2 (en) Link method
JP3830579B2 (en) Information analysis / editing system
JP2000276344A (en) Program generation system using object and its program generating method
JP2005141406A (en) Compiler inspection system and compiler inspection program