A Code Self-Relocation Method for Embedded System

2017 
Symbol relocation is very important for program linking and execution. For modern operating systems in PC, symbol relocation process is completed by static linking or dynamic linking. For the execution of Executable and Linkable Format (ELF) file in Linux, dynamic linker will resolve symbols at runtime. However, many embedded operating systems inhibit supporting dynamic linking of ELF file, which results in the symbol relocation is not successful. In this paper, we proposed a code self-relocation method. This method doesn't need extra support from operating system, and the whole relocation process is finished by code in the program. We relocate the entry in Global Offset Table (GOT) and the pointer in structure. This method is evaluated in a program with 37 source files. The result shows that all the entries in GOT and pointers in structure have been relocated to the absolute address, and the symbol relocation is successful. It proves that the method is simple but effective for the developer.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    12
    References
    1
    Citations
    NaN
    KQI
    []