loadable modules

Stanley Jobson stanley.jobson at gmx.ch
Wed Nov 2 22:12:51 UTC 2005

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

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);
    mod = loader_load("/imfs/module.so");
    execute = LoaderSymbol("execute");

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,

More information about the users mailing list