Hello All, I am to design a dynamic linker/loader on Nucleus RTOS running on ARM9. my aim is to conserve memory by loading only the required (one or more) modules and offload other modules. I checked out to find that the code can be compiled position independent using the armcc compiler. also the executable format produced by armcc is ELF(elf32-little). I need pointers in how to design this dynamic linker as well as the loader. My Work Environment Processor :ARM9 RTOS :Nucleus Tool suite :RVDS for ARM9 Thnks and Rgds Ravikiran
Dynamic Linking of modules
Started by ●February 28, 2007
Reply by ●February 28, 20072007-02-28
On Feb 28, 3:21 am, "bujji00" <rmupp...@ati.com> wrote:> Hello All, > > I am to design a dynamic linker/loader on Nucleus RTOS running on ARM9. > my aim is to conserve memory by loading only the required (one or more) > modules and offload other modules. > I checked out to find that the code can be compiled position independent > using the armcc compiler. also the executable format produced by armcc is > ELF(elf32-little). > I need pointers in how to design this dynamic linker as well as the > loader.For dynamic linking/loading, you must first define your primary and secondary memories. The best way is to use the SVC instruction to trap into your RTOS monitor and load from secondary memories. Be aware that you might not be doing RT anymore.> > My Work Environment > Processor :ARM9 > RTOS :Nucleus > Tool suite :RVDS for ARM9 > > Thnks and Rgds > Ravikiran
Reply by ●February 28, 20072007-02-28
On Mar 1, 12:21 am, "bujji00" <rmupp...@ati.com> wrote:> Hello All, > > I am to design a dynamic linker/loader on Nucleus RTOS running on ARM9. > my aim is to conserve memory by loading only the required (one or more) > modules and offload other modules. > I checked out to find that the code can be compiled position independent > using the armcc compiler. also the executable format produced by armcc is > ELF(elf32-little). > I need pointers in how to design this dynamic linker as well as the > loader. > > My Work Environment > Processor :ARM9 > RTOS :Nucleus > Tool suite :RVDS for ARM9 > > Thnks and Rgds > RavikiranMost systems have some scheme where there is a standard header at the front of the dynamically linked file/module with a table of pointers to functions in the module (and maybe string or integer names to index that table). FreeRADIUS has a system of linking in modules that may be worth looking at to get some ideas - check out http://wiki.freeradius.org/Modules. Because it is open source you can grab the code and see how it is done. - Charles