help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

load modules at run time without mmu


From: fabio . ferrari . aone
Subject: load modules at run time without mmu
Date: Wed, 21 May 2014 03:31:33 -0700 (PDT)
User-agent: G2/1.0

Hi guys,
I have 100 c modules, my system has to run only one module at a time (at run 
time); these modules have few functions called by the system and these have the 
same prototipe for every module. These modules has a lot of dependencies with 
the system.
My first approach was create only one project with all files, assign one 
section for each module, specify that all these sections must run in the same 
section.

Example: module A, B

name=".text_A" runin=".text_runmodule"
name=".rodata_A" runin=".rodata_runmodule"
name=".data_A" runin=".data_runmodule"
name=".bss_A" runin=".bss_runmodule"

name=".text_B" runin=".text_runmodule"
name=".rodata_B" runin=".rodata_runmodule"
name=".data_B" runin=".data_runmodule"
name=".bss_B" runin=".bss_runmodule"


with objcopy I extracted all the sections so I can create A.bin a B.bin e load 
these files at run time on the runmodule sections (in RAM)

I created an array of a structure that contains pointer to the module's 
functions.

drawbacks are:
1 - I have to create a lot of sections
2 - when I'm working with a module, I have to exclude from build the other 
modules to speed up time
3 - every time I modify a module I have to recompile all the modules because 
system has changed..and theoretically I SHOULD retest all the modules..

Any suggestion? Static or shared library? What else?..

Thanks,
Fabius


reply via email to

[Prev in Thread] Current Thread [Next in Thread]