A Code Self-Relocation Method for Embedded System

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.

[1]  Lara Wiesche Time-Dependent Dynamic Location and Relocation of Ambulances , 2013, OR.

[2]  Yookun Cho,et al.  An Efficient Pointer Protection Scheme to Defend Buffer Overflow Attacks , 2004, PARA.

[3]  Steven Alexander,et al.  Defeating Compiler-level Buffer Overflow Protection , 2005, Login: The Usenix Magazine.

[4]  John Johansen,et al.  PointGuard™: Protecting Pointers from Buffer Overflow Vulnerabilities , 2003, USENIX Security Symposium.

[5]  Christian S. Collberg,et al.  Protecting Against Unexpected System Calls , 2005, USENIX Security Symposium.

[6]  Lanfranco Lopriore Encrypted Pointers in Protection System Design , 2012, Comput. J..

[7]  Youjip Won,et al.  LASER: Latency-Aware Segment Relocation for non-volatile memory , 2015, J. Syst. Archit..

[8]  Christopher Preschern,et al.  A Component-Based Dynamic Link Support for Safety-Critical Embedded Systems , 2013, 2013 20th IEEE International Conference and Workshops on Engineering of Computer Based Systems (ECBS).

[9]  Ahmad-Reza Sadeghi,et al.  Just-In-Time Code Reuse: On the Effectiveness of Fine-Grained Address Space Layout Randomization , 2013, 2013 IEEE Symposium on Security and Privacy.

[10]  Danilo Gligoroski,et al.  Bypassing Data Execution Prevention on MicrosoftWindows XP SP2 , 2007, The Second International Conference on Availability, Reliability and Security (ARES'07).

[11]  Akhilesh Tyagi,et al.  Protection against indirect overflow attacks on pointers , 2004, Second IEEE International Information Assurance Workshop, 2004. Proceedings..

[12]  Chao Zhang,et al.  SecGOT: Secure Global Offset Tables in ELF Executables , 2013 .