KR101281954B1 - Method of incremental linking for embedded system - Google Patents

Method of incremental linking for embedded system Download PDF

Info

Publication number
KR101281954B1
KR101281954B1 KR1020060074917A KR20060074917A KR101281954B1 KR 101281954 B1 KR101281954 B1 KR 101281954B1 KR 1020060074917 A KR1020060074917 A KR 1020060074917A KR 20060074917 A KR20060074917 A KR 20060074917A KR 101281954 B1 KR101281954 B1 KR 101281954B1
Authority
KR
South Korea
Prior art keywords
section
list
binary
object file
symbol
Prior art date
Application number
KR1020060074917A
Other languages
Korean (ko)
Other versions
KR20080013424A (en
Inventor
민창우
Original Assignee
삼성전자주식회사
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 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020060074917A priority Critical patent/KR101281954B1/en
Publication of KR20080013424A publication Critical patent/KR20080013424A/en
Application granted granted Critical
Publication of KR101281954B1 publication Critical patent/KR101281954B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 임베디드 시스템을 위한 점진적 링킹 방법에 관한 것으로서 링킹 조건에 맞도록 섹션별 오브젝트 파일 목록을 작성하고, 섹션별 오브젝트 파일 목록에 포함되는 오브젝트 파일을 타임 스템프에 따라 정렬한 후, 섹션별 오브젝트 파일 목록과 이전 링크 시의 섹션별 오브젝트 파일 목록을 비교하여 삭제된 오브젝트 파일에 대한 심볼 정보를 삭제한다. 그리고 타임 스템프에 따라 정렬된 오브젝트 파일들 중 오브젝트 파일 내용이 변하지 않은 오브젝트 파일과 오브젝트 파일 내용이 변경된 오브젝트 파일에 대한 위치를 재 배치 하고, 오브젝트 파일 내용이 변경된 오브젝트 파일이 참조하는 심볼 정보들을 수정한다. 이후, 각 섹션의 링크된 바이너리를 하나의 바이너리로 작성하여 생성하려는 바이너리 포맷에 맞게 헤더를 삽입하는 것을 특징으로 한다.The present invention relates to a progressive linking method for an embedded system, to create a list of object files for each section to meet the linking conditions, and to sort the object files included in the section object file list according to the time stamp, and then to the object files for each section Compare the list with the list of section object files in the previous link and delete the symbol information for the deleted object file. Then, the location of the object file whose object file contents are not changed and the object file contents changed among the object files arranged according to time stamps are relocated, and the symbol information referenced by the object file whose object file contents are changed is modified. . After that, it is characterized by inserting a header corresponding to the binary format to be created by creating the linked binary of each section as one binary.

임베디드 시스템, 오브젝트 파일, 점진적 링킹 Embedded system, object file, progressive linking

Description

임베디드 시스템을 위한 점진적 링킹 방법{METHOD OF INCREMENTAL LINKING FOR EMBEDDED SYSTEM}Gradual linking method for embedded systems {METHOD OF INCREMENTAL LINKING FOR EMBEDDED SYSTEM}

도 1은 종래의 점진적 링커에 의해 생성된 바이너리를 나타낸 예시도,1 is an exemplary view showing a binary generated by a conventional gradual linker,

도 2는 본 발명의 실시 예에 따라 링킹 과정을 수행하기 위한 모듈 간의 관계를 나타낸 예시도,2 is an exemplary view showing a relationship between modules for performing a linking process according to an embodiment of the present invention;

도 3은 본 발명의 실시 예에 따라 오브젝트 투 섹션 맵퍼의 수행 과정을 나타낸 제어 흐름도,3 is a control flowchart illustrating a process of performing an object-to-section mapper according to an embodiment of the present invention;

도 4a 내지 도4c는 본 발명의 실시 예에 따라 오브젝트 로케이터의 수행 과정을 나타낸 제어 흐름도,4A to 4C are flowcharts illustrating a process of performing an object locator according to an embodiment of the present invention;

도 5는 본 발명의 실시 예에 따라 심볼 리졀버의 수행 과정을 나타낸 제어 흐름도,5 is a control flowchart illustrating a process of performing a symbol receiver according to an embodiment of the present invention;

도 6은 본 발명의 실시 예에 따라 링크된 바이너리 제너레이터의 수행 과정을 나타낸 제어 흐름도,6 is a control flowchart illustrating a process of executing a linked binary generator according to an embodiment of the present invention;

상술한 목적을 달성하기 위한 본 발명은 임베디드 시스템을 위한 소프트웨어 개발 시간을 단축하기 위한 방법에 관한 것으로, 특히, 소프트웨어 개발 시간 중 링크 시간을 단축하기 위한 방법에 관한 것이다.The present invention for achieving the above object relates to a method for shortening the software development time for an embedded system, and more particularly, to a method for shortening the link time during the software development time.

임베디드 시스템이란 시스템을 동작시키는 소프트웨어를 하드웨어에 내장하여 특수한 기능만을 가진 시스템을 말한다. 흔히 사용되고 있는 PC(Personal Computer)는 하드디스크와 같은 대용량 저장장치에 운영체제를 내장하고 있다. 그에 반해 임베디드 시스템은 OS와 응용프로그램들이 ROM(Flash)에 이미지 형태로 저장되어 있다가 부팅과 동시에 RAM을 만든 후, RAM 상에 OS와 응용프로그램들이 구성되고 구동되는 시스템이다.An embedded system is a system having only special functions by embedding the software for operating the system in hardware. A commonly used personal computer (PC) has an operating system embedded in a mass storage device such as a hard disk. In contrast, an embedded system is a system in which operating systems and applications are stored in ROM (Flash) in the form of an image, and the RAM is created at boot time, and then the OS and the applications are configured and run on the RAM.

이러한 임베디드 시스템을 동작시키기 위한 소프트웨어의 개발은 편집, 컴파일, 링크, 테스트 과정을 반복적으로 거치게 된다. 이러한 소프트웨어 개발 과정 중 소프트웨어의 크기가 커질수록 컴파일과 링크 과정에 할애해야 하는 시간이 점점 늘어나고 있다.The development of software to run such an embedded system is repeatedly edited, compiled, linked, and tested. As the size of the software grows during the software development process, the time to compile and link is increasing.

이에 따라, 컴파일과 링크 시간을 줄이기 위한 방법들이 제시되고 있다. 먼저, 컴파일 시간을 줄이기 위한 방법을 살펴보면, 개발자 또는 툴을 이용하여 컴파일을 해야 할 파일에 영향을 미치는 파일에 대한 목록을 작성하여, 컴파일 결과가 바뀔 때만 컴파일하도록 함으로써, 컴파일 횟수를 줄이는 방법이 있다. 또한, 컴파일해야 할 파일들을 복수 개의 단말에서 나누어 동시에 컴파일하는 그리드 컴퓨팅 형태의 분산 컴파일 기술을 이용해 전체 컴파일에 걸리는 시간을 획기적으로 줄인다. Accordingly, methods for reducing compilation and link time have been proposed. First, how to reduce the compile time, there is a way to reduce the number of compilations by using a developer or a tool to create a list of files that affect the files to be compiled, and to compile only when the compilation results change. . In addition, by using a distributed computing technology in the form of grid computing that divides the files to be compiled in a plurality of terminals at the same time, the entire compilation time is significantly reduced.

다음으로, 링크 시간을 줄이기 위한 방법을 살펴보면, 연관된 오프젝트 파일을 하나의 동적 라이브러리로 링크하는 방법이 있다. 이러한 동적 라이브러리로 링크하는 방법에서의 프로그램은 메인 프로그램과 복수 개의 동적 라이브러리로 구성되며, 메인 프로그램은 프로그램이 시작되면, 동적 라이브러리를 로드한다. 따라서, 프로그램 실행 시 바뀐 목적 파일을 포함하고 있는 동적 라이브러리만 다시 링크함으로써 링크 시간을 단축할 수 있다. 또한, 일부 컴파일러는 점진적 링킹을 지원한다. 종래의 점진적 링킹은 코드 영역과 데이터 영역에 임의의 크기의 패딩 바이트가 포함된 파일을 생성한다. 종래의 점진적 링킹을 도 1을 참조하여 살펴보기로 한다.Next, let's look at how to reduce the link time, and how to link the associated object files into one dynamic library. The program in the method of linking to such a dynamic library consists of a main program and a plurality of dynamic libraries, and the main program loads the dynamic library when the program starts. Therefore, the link time can be shortened by relinking only the dynamic library containing the changed object file when the program is executed. In addition, some compilers support progressive linking. Conventional gradual linking creates a file containing padding bytes of arbitrary size in the code region and the data region. Conventional gradual linking will be described with reference to FIG. 1.

종래의 점진적 링킹은 최초 링킹 시 도 1과 같이 각 오브젝트 파일과 해당 오브젝트 파일이 변경되면, 변경된 코드를 삽입하기 위한 패딩 바이트 영역으로 구성된 바이너리를 생성한다. 따라서, 일부 오브젝트 파일이 변경된 후 다시 링킹을 하면, 먼저 변경된 코드와 데이터가 패딩 바이트 영역에 들어갈 수 있는지 검사를 한다. 만일, 변경된 코드와 데이터가 패딩 바이트 영역에 들어가면 변경된 부분을 패딩 바이트 영역에 삽입함으로써 링크를 완료하게 된다. 하지만, 변경된 코드와 데이터가 패딩 바이트 영역에 들어가지 못하면, 전체 링크를 수행하게 된다.Conventional gradual linking generates a binary composed of a padding byte area for inserting a changed code when each object file and the corresponding object file are changed as shown in FIG. 1 during initial linking. Therefore, when some object files are changed and then linked again, first, the changed code and data are checked to see if they can fit in the padding byte area. If the changed code and data enter the padding byte area, the link is completed by inserting the changed part into the padding byte area. However, if the changed code and data do not fit in the padding byte area, the entire link is performed.

일반적으로, 임베디드 시스템의 경우, 일반 PC에 비해 느린 CPU와 저 용량의 메모리를 갖는다. 따라서, 일반 PC나 서버 환경과 달리 많은 하드웨어적인 제약을 갖게 된다. 특히, 대부분의 임베디드 시스템은 가상 메모리를 지원하지 않는 단일 어드레스 공간을 지원하기 때문에 동적 라이브러리를 효율적으로 구현할 수 없다. 또한, 도 1을 참조하여 살펴보면, 기존에 제안된 점진적 링크 방법의 경우, 최종 생성된 바이너리가 패딩 바이트를 가지기 때문에 점진적 링크를 사용하지 않은 경우보다 그 크기가 더욱 크다. 따라서, 메모리의 제약이 심한 임베디드 시스템에 적용이 어렵다. 또한, 임베디드 시스템은 각 오브젝트 파일의 코드 영역과 데이터 영역의 위치를 링크 스크립트를 통해서 지정하기 때문에 링크 위치상의 제약을 가진다. 따라서, 기존의 점진적 링크 방법은 가상 메모리를 지원한다는 가정 하에 설계되었기 때문에 임베디드 시스템에 적용할 수 없다.In general, embedded systems have slower CPUs and lower memory than regular PCs. Therefore, unlike general PC or server environment, there are many hardware limitations. In particular, most embedded systems support a single address space that does not support virtual memory, making it impossible to efficiently implement dynamic libraries. In addition, referring to FIG. 1, in the case of the conventionally proposed gradual link method, since the last generated binary has a padding byte, its size is larger than that of the case where no gradual link is used. Therefore, it is difficult to apply to an embedded system with severe memory constraints. In addition, since the embedded system designates the location of the code area and data area of each object file through the link script, there is a limitation on the link location. Therefore, the existing gradual link method is designed on the assumption that it supports virtual memory and thus cannot be applied to an embedded system.

이에 따라 본 발명은 임베디드 시스템을 위한 소프트웨어 개발을 위한 링크 과정 중 오브젝트 파일의 위치를 조정하여 링크 시간을 단축하기 위한 방법을 제공한다.Accordingly, the present invention provides a method for shortening the link time by adjusting the position of the object file during the linking process for software development for the embedded system.

상술한 목적을 달성하기 위한 본 발명은 임베디드 시스템을 위한 점진적 링킹을 가능하게 하는 구성 요소에 있어서, 각 섹션에 포함될 오브젝트 파일 목록을 작성하는 오브젝트 투 섹션 맵퍼와, 상기 각 섹션에 포함된 각 오브젝트 파일들의 위치를 재 배치하는 오브젝트 로케이터와, 상기 섹션에 포함되는 오브젝트 파일 상호 간에 참조하는 심볼 데이터 정보를 추가, 삭제, 갱신 조회하는 심볼 테이블 매니저와, 상기 심볼 테이블 매니저로부터 심볼 데이터 정보를 전달받아 재배치된 오 브젝트 파일들 상호 간에 참조하는 심볼 데이터 정보를 갱신하는 심볼 리졀버와, 각 섹션별로 생성된 바이너리를 하나의 링크된 바이너리로 생성하는 링크된 바이너리 제너레이터로 구성됨을 특징으로 한다.In order to achieve the above object, the present invention provides a component that enables progressive linking for an embedded system, comprising: an object-to-section mapper for creating a list of object files to be included in each section, and each object file included in each section. An object locator for rearranging the location of the objects, a symbol table manager for adding, deleting, and updating symbol data information referenced between the object files included in the section, and receiving and relocating symbol data information from the symbol table manager. It is characterized by consisting of a symbol receiver for updating the symbol data information referenced between the object files, and a linked binary generator for generating a binary generated by each section as a linked binary.

또한, 임베디드 시스템을 위한 점진적 링킹 방법에 있어서, 각 섹션별 오브젝트 파일 목록을 작성하는 단계와, 상기 각 섹션에 포함된 오브젝트 파일들 상호 간의 위치를 재배치하는 단계와, 재배치된 오브젝트 파일들 상호 간에 참조하는 심볼 데이터 정보를 갱신하는 단계와, 각 섹션의 링크된 바이너리를 하나의 바이너리로 생성하고, 바이너리 포맷에 맞게 헤더를 삽입하는 단계를 포함하는 것을 특징으로 한다.Further, in an incremental linking method for an embedded system, a method of creating an object file list for each section, relocating positions of object files included in each section, and referencing between relocated object files And updating the symbol data information, generating the linked binary of each section into one binary, and inserting a header according to the binary format.

이하 본 발명의 바람직한 실시 예를 첨부한 도면을 참조하여 상세히 설명한다. 하기 설명 및 첨부 도면에서 본 발명의 요지를 불필요하게 흐를 수 있는 공지 기능 및 구성에 대한 상세한 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description and the accompanying drawings, detailed descriptions of well-known functions and configurations that may unnecessarily flow the gist of the present invention will be omitted.

그러면 이제 임베디드 시스템에서 오브젝트 파일들을 이용해 링크 스크립트에 기술된 제약조건에 만족하도록 링크된 바이너리로 생성하기 위한 모듈들 간의 관계를 도 2를 참조하여 설명하도록 한다.Next, the relationship between the modules for generating the linked binary to satisfy the constraints described in the link script using the object files in the embedded system will be described with reference to FIG. 2.

도 2를 살펴보면, 오브젝트 투 섹션 맵퍼(204)는 링커가 여러 가지 오브젝트 파일을 공통된 성질의 것들로 모아서 관리하는 포맷인 섹션의 섹션 메타 데이터를 생성한다. 상기한 섹션 메타 데이터는 섹션에 포함되는 오브젝트들의 시작 어드레스, 끝 어드레스, 오브젝트 파일 목록, 각 오브젝트 파일의 타임 스템프, 각 오브젝트 파일의 링크 된 상태의 바이너리 정보를 포함한다.Referring to FIG. 2, the object-to-section mapper 204 generates section metadata of a section, which is a format in which the linker collects and manages various object files in common. The section metadata includes a start address, an end address, an object file list, a time stamp of each object file, and binary information of a linked state of each object file included in the section.

오브젝트 로케이터(206)는 상술한 섹션 메타 데이터를 이용하여 링킹 작업 시 오브젝트 파일들의 이동을 최소로 하기 위해 각 오브젝트 파일들의 순서를 결정하는 역할을 한다.The object locator 206 uses the section metadata described above to determine the order of each object file in order to minimize the movement of the object files during the linking operation.

심볼 리졀버(208)는 심볼 테이블 매니저(214)를 이용하여 각 오브젝트 파일들이 참조하는 다른 오브젝트 파일 내의 심볼 정보를 업데이트하는 역할을 하며, 변경된 오브젝트 파일이 다른 오브젝트 파일에서 참조 가능하도록 심볼을 갱신하도록 한다.The symbol retriever 208 uses the symbol table manager 214 to update symbol information in other object files referred to by each object file, and to update the symbol so that the changed object file can be referenced from another object file. do.

링크된 바이너리 제너레이터(210)는 각 섹션별로 생성된 바이너리를 하나의 링크된 바이너리로 생성하는 역할을 한다.The linked binary generator 210 serves to generate a binary generated for each section into one linked binary.

심볼 테이블 매니저(214)는 익스폴티드 심볼 데이터와 외부 심볼 참조 데이터로 구성된다. 익스폴티드 심볼 데이터는 오브젝트 파일이 참조하고 있는 심볼에 대한 정보로서, 심볼의 이름, 심볼이 포함되어 있는 오브젝트 파일명, 오브젝트 바이너리에서 심볼의 오프셋 정보를 포함한다. 그리고 외부 심볼 참조 데이터는 다른 오브젝트 파일에 있는 심볼을 참조하는 정보로서, 심볼의 이름과 해당 심볼을 참조하는 오브젝트의 목록 정보를 포함한다.The symbol table manager 214 is composed of expanded symbol data and external symbol reference data. Expanded symbol data is information about a symbol referenced by an object file, and includes the symbol name, the object file name containing the symbol, and offset information of the symbol in the object binary. The external symbol reference data is information for referring to a symbol in another object file, and includes name of a symbol and list information of an object referring to the symbol.

그러면, 오브젝트 파일들을 링크 스크립트에 기술된 제약조건에 만족하도록 링크된 바이너리로 생성하기 위한 과정을 도 3 내지 6을 참조하여 설명하도록 한다.Next, a process for generating object files into linked binaries to satisfy the constraints described in the link script will be described with reference to FIGS. 3 to 6.

도 3은 섹션 메타 데이터를 생성하기 위한 오브젝트 투 섹션 맵퍼(204)의 수행 과정이다.3 is a flowchart of an object-to-section mapper 204 for generating section metadata.

300단계에서 오브젝트 투 섹션 맵퍼(204)는 대기 상태이다. 이후, 302단계에서 링킹이 실행되면, 오브젝트 투 섹션 맵퍼(204)는 304단계로 진행하여 각 섹션에 포함될 오브젝트 리스트를 작성하고, 링크 스크립트에 기술된 와일드 카드 규칙과 어드레스 제약 조건을 만족시키는 섹션별 오브젝트 파일 목록을 작성한다. 이후, 오브젝트 투 섹션 맵퍼(204)는 306단계로 진행하여 상기한 오브젝트 파일 목록을 바탕으로 각 섹션별 섹션 메타 데이터인 오브젝트 파일들의 시작 어드레스, 끝 어드레스, 오브젝트 파일 목록, 각 오브젝트 파일의 타임 스템프를 생성한다. 이후, 308단계에서 오브젝트 투 섹션 맵퍼(204)는 섹션별 오브젝트 파일 목록을 타임 스템프에 따라 오름차순으로 정렬한다. 이후, 310단계로 진행한 오브젝트 투 섹션 맵퍼(204)는 섹션별 오브젝트 파일 목록을 이전 링크에서의 오브젝트 파일 목록과 비교하여 삭제된 오브젝트 파일에 대한 익스폴티드 심볼 데이터 및 외부 심볼 참조 데이터를 삭제하도록 심볼 테이블 매니저에 요청한다.In operation 300, the object to section mapper 204 is in a standby state. Then, when linking is executed in step 302, the object-to-section mapper 204 proceeds to step 304 to create a list of objects to be included in each section, and to section-by-section that satisfies the wildcard rule and address constraint described in the link script. Create a list of object files. In operation 306, the object-to-section mapper 204 proceeds to the start address, end address, object file list, and time stamp of each object file, which are the section metadata for each section, based on the object file list. Create In operation 308, the object-to-section mapper 204 sorts the section-based object file list in ascending order according to the time stamp. Thereafter, the object-to-section mapper 204 proceeds to step 310 to compare the section-specific object file list with the object file list in the previous link so as to delete the exported symbol data and external symbol reference data for the deleted object file. Ask the symbol table manager.

도 4a 내지 4c는 도 3의 오브젝트 투 섹션 맵퍼(204)의 수행 과정을 통해 생성된 섹션 메타 데이터를 이용하여 각 오브젝트들의 위치를 결정하는 오브젝트 로케이터(206)의 수행 과정이다. 그러면, 이하, 도 4a 내지 4c를 참조하여 오브젝트 로케이터(206)에서 섹션 메타 데이터를 이용하여 각 오브젝트들의 위치를 결정하는 과정에 대하여 살펴보도록 한다.4A through 4C illustrate an object locator 206 that determines the location of each object using section metadata generated by the object to section mapper 204 of FIG. 3. Next, a process of determining the location of each object using section metadata in the object locator 206 will be described with reference to FIGS. 4A through 4C.

400단계에서 오브젝트 로케이터(206)는 섹션에 속하는 모든 오브젝트 파일 목록을 세틀드 리스트에 추가한다. 이후, 402단계에서 오브젝트 로케이터(206)는 섹션의 시작 어드레스와 끝 어드레스를 이전 링크와 비교하여 겹치지 않는 부분에 있는 오브젝트와 새로 추가된 오브젝트를 세틀드 리스트에서 디폴테이션 리스트로 옮긴다. 이후, 404단계로 진행한 오브젝트 로케이터(206)는 오브젝트 파일 중에서 이전 링크와 타임 스탬프가 변경된 오브젝트를 세틀드 리스트와 디폴테이션 리스트에서 삭제하고, 모디파이드 리스트에 추가한다. 이후, 406단계에서 오브젝트 로케이터(206)는 섹션 내에서 세틀드 리스트의 오브젝트가 점유하고 있지 않은 공간을 자유 블록 리스트에 추가하고 오름차순으로 정렬한다. 이 단계까지 마치면 세틀드 리스트는 옮길 필요가 없는 오브젝트의 목록을 가지게 된다.In step 400, the object locator 206 adds a list of all object files belonging to the section to the set list. Then, in step 402, the object locator 206 compares the start address and the end address of the section with the previous link and moves the object and the newly added object in the non-overlapping part from the settled list to the default list. Thereafter, the object locator 206 proceeds to step 404 and deletes the object whose previous link and time stamp are changed from the object file in the set list and the default list, and adds it to the modified list. Then, in step 406, the object locator 206 adds the space not occupied by the objects in the set list to the free block list and sorts in ascending order. After this step, the settled list contains a list of objects that do not need to be moved.

이후, 오브젝트 로케이터(206)는 408단계에서 디폴테이션 리스트에 저장된 오브젝트 파일들 중 프리 블록 크기보다 작은 오브젝트 파일이 존재하는지 검사를 한다. 검사 결과 디폴테이션 리스트에 저장된 오브젝트 파일들 중 프리 블록 크기보다 작은 오브젝트 파일이 존재하면, 오브젝트 로케이터(206)는 410단계로 진행하여 해당 오브젝트를 디폴테이션 리스트에서 세틀트 리스트로 옮기고, 해당 오브젝트를 프리 블록에 복사한 후 프리 블록 어드레스를 재정의한다. 만일, 408단계에서 프리 블록에 할당될 수 있는 오브젝트가 없는 경우, 오브젝트 로케이터(206)는 도4c의 422단계로 진행하여 세틀트 리스트, 모디파이드 리스트, 디폴테이션 리스트, 프리 블록 리스트에 저장된 정보를 삭제하고 모든 오브젝트 파일을 디폴테이션 리스트에 추가를 한다. 이후, 오브젝트 로케이터(206)는 424단계로 진행하여 섹션 전체를 영역으로 하는 프리 블록을 프리 블록 리스트에 추가를 하고 408단계로 진행한다. 한편, 410단계로부터 진행된 오브젝트 로케이터(206)는 412단계로 진행하여 디폴테이션 리스트가 비었는지 검사를 한다. 검사 결과 디폴테이션 리스트가 비어 있으면, 오브젝트 로케이터(206)는 414단계로 진행하여 모디파이드 리스트에 있는 오브젝트 중에 현재의 프리 블록보다 크기가 작은 오브젝트가 존재하는지 검사를 한다. 검사 결과 모디파이드 리스트에 있는 오브젝트 중에 현재의 프리 블록보다 크기가 작은 오브젝트가 존재하면, 오브젝트 로케이터(206)는 416단계로 진행하여 해당 오브젝트들 중에서 타임 스탬프가 가장 오래된 오브젝트 파일을 모디파이드 리스트에서 삭제하고 프리 블록에 복사를 한 후 프리 블록 어드레스를 재정의한다. 이후, 418단계에서 오브젝트 로케이터(206)는 모디파이드 리스트가 비어있으면, 420단계로 진행하여 디폴테이션 리스트와 모디파이드 리스트에 추가된 적이 있는 오브젝트 파일을 리링크 리스트에 추가한다.In operation 408, the object locator 206 checks whether an object file smaller than the free block size exists among the object files stored in the default list. If the object file smaller than the free block size exists among the object files stored in the default list, the object locator 206 proceeds to step 410 to move the object from the default list to the set list and free the object. After copying to the block, redefine the free block address. If there is no object that can be allocated to the free block in step 408, the object locator 206 proceeds to step 422 of FIG. 4C and displays the information stored in the set list, the modified list, the default list, and the free block list. Delete and add all object files to the default list. Thereafter, the object locator 206 proceeds to step 424 to add a free block including the entire section to the free block list and proceeds to step 408. In step 410, the object locator 206 proceeds to step 412 and checks whether the default list is empty. If the inspection result defaults to an empty list, the object locator 206 proceeds to step 414 and checks whether an object smaller than the current free block exists among the objects in the modified list. If there is an object in the modified list that is smaller in size than the current free block, the object locator 206 proceeds to step 416 to delete the object file having the oldest time stamp among the objects from the modified list. After copying to the free block, redefine the free block address. In step 418, the object locator 206 adds the object file that has been added to the default list and the modified list to the relinked list if the modified list is empty.

다음으로 도 5를 통해 도 4에서 설명한 오브젝트 로케이터(206)에 의해 생성된 리링크 리스트에 있는 오브젝트 파일들을 입력받아 수정된 오브젝트 파일들이 참조하는 심볼 들을 업데이트하는 심볼 리절버(208)의 수행 과정을 설명하기로 한다.Next, a process of performing the symbol resolver 208 that receives the object files in the relink list generated by the object locator 206 described in FIG. 4 and updates the symbols referenced by the modified object files will be described with reference to FIG. 5. Let's explain.

500단계에서 심볼 리졀버(208)는 리링크 리스트에 있는 오브젝트 파일들에 대해 익스폴티드 심볼 데이터와 외부 심볼 참조 데이터를 갱신하도록 심볼 테이블 매니저에 요청을 한 후, 갱신된 익스폴티드 심볼 데이터를 리링크 심볼 리스트에 추가를 한다. 이후, 502단계로 진행한 심볼 리졀버(208)는 리링크 리스트에 있는 오브젝트 파일들에 대해서 재링크를 진행하고 링크된 섹션 바이너리를 수정한다. 이후, 504단계에서 심볼 리졀버(208)는 리링크 심볼 리스트에 있는 심볼 이름을 키로 하여 외부 심볼 참조 데이터에서 같은 이름을 가지는 심볼을 검색한다. 이후, 심볼 리졀버(208)는 506단계로 진행하여 탐색된 심볼에 대해 참조 정보를 업데이트하고 링크된 섹션 바이너리를 수정한다.In step 500, the symbol receiver 208 requests the symbol table manager to update the expanded symbol data and the external symbol reference data for the object files in the relink list, and then updates the updated expanded symbol data. Add to the link symbol list. Thereafter, the symbol receiver 208 proceeds to step 502 to relink the object files in the relink list and to modify the linked section binary. In operation 504, the symbol receiver 208 searches for a symbol having the same name in the external symbol reference data using the symbol name in the relink symbol list as a key. The symbol retriever 208 then proceeds to step 506 to update the reference information for the found symbols and to modify the linked section binaries.

다음으로 도 6을 통해 도 5에서 설명한 심볼 리졀버(208)에 의해 생성된 링크된 섹션 바이너리를 이용해 하나의 바이너리로 생성하는 링크된 바이너리 제너레이터(210)의 수행 과정을 설명한다.Next, a process of performing the linked binary generator 210 which generates one binary file by using the linked section binary generated by the symbol receiver 208 described with reference to FIG. 5 will be described with reference to FIG. 6.

600단계에서 링크된 바이너리 제너레이터(210)는 각 섹션의 링크된 섹션 바이너리를 하나의 바이너리로 작성한다. 이후, 602단계에서 링크된 바이너리 제너레이터(210)는 생성하려는 포맷에 맞게 헤더를 삽입하여 하나의 바이너리를 생성해 낸다.In step 600, the linked binary generator 210 creates the linked section binary of each section into one binary. Then, the binary generator 210 linked in step 602 generates a binary by inserting a header according to the format to be created.

상술한 바와 같이 본 발명은 오브젝트 파일의 내용이 변경되지 않은 오브젝트 파일은 그대로 두고 오브젝트 파일의 내용이 변경된 오브젝트 파일이 가장 뒤에 위치하게 한다. 또한, 오브젝트 파일의 내용이 변경된 오브젝트 파일의 이동을 최소화함으로써, 임베디드 시스템을 위한 소프트웨어 개발 시 링크 과정에서 발생하는 병목현상에 대한 문제점을 해소할 수 있다.As described above, in the present invention, the object file in which the contents of the object file are not changed is left as it is, and the object file in which the contents of the object file is changed is located at the end. In addition, by minimizing the movement of the object file in which the contents of the object file are changed, it is possible to solve the problem of bottlenecks occurring during the linking process in software development for the embedded system.

Claims (2)

임베디드 시스템을 위한 점진적 링킹을 가능하게 하는 구성 요소에 있어서,In a component that enables progressive linking for an embedded system, 각 섹션에 포함될 오브젝트 파일 목록을 작성하는 오브젝트 투 섹션 맵퍼와,An object-to-section mapper that creates a list of object files to be included in each section, 상기 각 섹션에 포함된 각 오브젝트 파일들의 위치를 재배치하는 오브젝트 로케이터와,An object locator for relocating each object file included in each section; 상기 섹션에 포함되는 오브젝트 파일 상호 간에 참조하는 심볼 데이터 정보를 추가, 삭제, 갱신 조회하는 심볼 테이블 매니저와,A symbol table manager for adding, deleting, and updating symbol data information referenced between object files included in the section; 상기 심볼 테이블 매니저로부터 심볼 데이터 정보를 전달받아 재배치된 오브젝트 파일들 상호 간에 참조하는 심볼 데이터 정보를 갱신하는 심볼 리졀버와,A symbol receiver for receiving symbol data information from the symbol table manager and updating symbol data information referenced between the rearranged object files; 각 섹션별로 생성된 바이너리를 하나의 링크된 바이너리로 생성하는 링크된 바이너리 제너레이터로 구성됨을 특징으로 하는 임베디드 시스템을 위한 점진적 링킹 방법.A progressive linking method for an embedded system, characterized by consisting of a linked binary generator that generates the binaries generated for each section into one linked binary. 임베디드 시스템을 위한 점진적 링킹 방법에 있어서,In the progressive linking method for an embedded system, 각 섹션별 오브젝트 파일 목록을 작성하는 단계와,Creating a list of object files for each section, 상기 각 섹션에 포함된 오브젝트 파일들 상호 간의 위치를 재배치하는 단계와,Relocating positions of object files included in the sections; 재배치된 오브젝트 파일들 상호 간에 참조하는 심볼 데이터 정보를 갱신하는 단계와,Updating symbol data information referenced between the relocated object files; 각 섹션의 링크된 바이너리를 하나의 바이너리로 생성하고, 바이너리 포맷에 맞게 헤더를 삽입하는 단계를 포함하는 것을 특징으로 하는 임베디드 시스템을 위한 점진적 링킹 방법.And generating a linked binary of each section into a single binary, and inserting a header in accordance with the binary format.
KR1020060074917A 2006-08-08 2006-08-08 Method of incremental linking for embedded system KR101281954B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060074917A KR101281954B1 (en) 2006-08-08 2006-08-08 Method of incremental linking for embedded system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060074917A KR101281954B1 (en) 2006-08-08 2006-08-08 Method of incremental linking for embedded system

Publications (2)

Publication Number Publication Date
KR20080013424A KR20080013424A (en) 2008-02-13
KR101281954B1 true KR101281954B1 (en) 2013-07-03

Family

ID=39341183

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060074917A KR101281954B1 (en) 2006-08-08 2006-08-08 Method of incremental linking for embedded system

Country Status (1)

Country Link
KR (1) KR101281954B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831178B (en) * 2012-07-30 2016-05-25 华为技术有限公司 Heavy dispositions method and the device of multistage storage

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030037125A (en) * 2001-11-02 2003-05-12 한국전자통신연구원 Apparatus and Implementation Method of Retargettable Incremental Linking Loarder for Embedded Systems
KR20050010640A (en) * 2003-07-22 2005-01-28 재단법인서울대학교산학협력재단 Dynamic Linking Method for Application Program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030037125A (en) * 2001-11-02 2003-05-12 한국전자통신연구원 Apparatus and Implementation Method of Retargettable Incremental Linking Loarder for Embedded Systems
KR20050010640A (en) * 2003-07-22 2005-01-28 재단법인서울대학교산학협력재단 Dynamic Linking Method for Application Program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
논문1:한국정보과학회 *

Also Published As

Publication number Publication date
KR20080013424A (en) 2008-02-13

Similar Documents

Publication Publication Date Title
JP5208350B2 (en) Self-describing software image update component
KR100952251B1 (en) Servicing a component base software product
CN109614165B (en) Multi-version parallel operation method and device for COM (component object model) component
US7971201B2 (en) Multiple operating device version software generating system and multiple operating device version software generation support program and method
US20160026509A1 (en) Method and system for improving startup performance and interoperability of a virtual application
US20070132774A1 (en) System and method for a patch minimization tool
US20070079306A1 (en) Object ordering tool for facilitating generation of firmware update friendly binary image
US8341609B2 (en) Code generation in the presence of paged memory
CN101002174B (en) Method for loading software with an intermediate object oriented language in a portable device
CN111176717B (en) Method and device for generating installation package and electronic equipment
KR101401143B1 (en) System and method for change logging in a firmware over the air development environment
US20080022269A1 (en) Method and Apparatus for Building Executable Computer Programs Using Compiled Program Libraries
US8843920B2 (en) Systems and methods for deferring software implementation decisions until load time
CA2477783A1 (en) Iterative software development environment with prioritized build rules
JP6718119B2 (en) Compiling program, compiling method, and information processing apparatus
EP0840242A2 (en) Method for creating a virtual file system
CN116934330A (en) Method for calling intelligent contract, executing method, computer equipment and storage medium
US5946493A (en) Method and system in a data processing system for association of source code instructions with an optimized listing of object code instructions
KR101281954B1 (en) Method of incremental linking for embedded system
CN101571801A (en) Service expansion system and method
US20030088865A1 (en) Apparatus and method for incrementally performing remote loading
KR101670916B1 (en) Method for storing function and system device using the same
US7389515B1 (en) Application deflation system and method
US10310871B2 (en) Non-transitory computer-readable recording medium storing control program, control device and control method
CN115576560A (en) Hot reloading method, device, equipment and medium for dynamic loader

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee