{"title":"Dynamic Code Loading to a Bare-metal Embedded Target","authors":"Andrew Sadek, M. Elmahdy, Tarek ElDeeb","doi":"10.1145/3220267.3220568","DOIUrl":null,"url":null,"abstract":"Dynamic Code loading at run-time is a challenging task in embedded systems. While dynamic linker feature is provided by many operating systems for ELF files such as Linux, bare metal embedded systems shall not depend on any OS support. Indeed, various researches have deployed Position Independent Code (PIC) approach instead of dynamic linking allowing the code to run regardless its memory location. The work presented here aims at providing an efficient methodology for run-time code loading of multiple applications to a bare metal embedded target. In the first place, the code is compiled in position-independent form then linked with base image at compile time. Correspondingly, the resulting program is considered as an add-on to the base image and sent to a specified section in the target memory. Furthermore, 'GCC' and 'Binutils' were customized to enhance the current implemented methodology of (PIC). This allows referencing data by offset from the start of text section instead of using Global Offset Table (GOT) hence making position independent code smaller and more efficient. After all, work-ow was implemented on an FPGA Board using Microblaze processor and tested with Dhrystone benchmark. Markedly, the results and performance analysis have proven better efficiency for the proposed work-ow.","PeriodicalId":177522,"journal":{"name":"International Conference on Software and Information Engineering","volume":"1 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2018-05-02","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Conference on Software and Information Engineering","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3220267.3220568","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Dynamic Code loading at run-time is a challenging task in embedded systems. While dynamic linker feature is provided by many operating systems for ELF files such as Linux, bare metal embedded systems shall not depend on any OS support. Indeed, various researches have deployed Position Independent Code (PIC) approach instead of dynamic linking allowing the code to run regardless its memory location. The work presented here aims at providing an efficient methodology for run-time code loading of multiple applications to a bare metal embedded target. In the first place, the code is compiled in position-independent form then linked with base image at compile time. Correspondingly, the resulting program is considered as an add-on to the base image and sent to a specified section in the target memory. Furthermore, 'GCC' and 'Binutils' were customized to enhance the current implemented methodology of (PIC). This allows referencing data by offset from the start of text section instead of using Global Offset Table (GOT) hence making position independent code smaller and more efficient. After all, work-ow was implemented on an FPGA Board using Microblaze processor and tested with Dhrystone benchmark. Markedly, the results and performance analysis have proven better efficiency for the proposed work-ow.