loadable modules

Till Straumann strauman at slac.stanford.edu
Wed Nov 2 23:22:43 UTC 2005


Stanley Jobson wrote:

>hi,
>i am trying to add a "loadable modules" feature to my app. currently this
>app is running on i386.
>  
>

I don't know esh but cexp works on i386 
(http://www.slac.stanford.edu/~strauman/rtems/).
You might also want to check out the rtems evaluation CD...

HTH
-- T.

>i found libesh which includes libld and libstab. i extracted these too libs
>and worked through the given READMEs and examples.
>
>i managed to build a relocatable object and include it into the image
>(created a tar, converted it into an obj, linked it to the app and used
>imfs and untar_frommemory to make it available at runtime).
>
>with the following code i tried to execute a function on the module:
>
>    module_t mod;
>    int (*execute)(void);
>    
>    loader_init();
>    mod = loader_load("/imfs/module.so");
>    loader_show();
>   
>    printf("execute()\n"); 
>    execute = LoaderSymbol("execute");
>    execute();
>        
>    loader_unload(mod);
>
>everything works fine til the "execute()" call which causes an rtems panic.
>i am sure i missed something but i have no idea what.
>
>i still do not understand the use of mkstab :( ... it creates a function
>system_symbol_table_init(). who calls it ? when?
>
>does anyone use this loader?
>is there any more init necessary (e.g. symbol table)? how?
>any working examples available (apart from the hello world in libesh) ?
>
>much thx,
>regards,
>stan
>
>
>
>
>  
>




More information about the users mailing list