dynamic linker in RTEMS 5 ?

Goetz Pfeiffer Goetz.Pfeiffer at helmholtz-berlin.de
Wed Dec 20 07:40:04 UTC 2017


On 12/19/2017 10:47 PM, Chris Johns wrote:
> On 19/12/2017 23:44, Goetz Pfeiffer wrote:
>> at the Helmholtz-Zentrum Berlin we control an electron storage ring facility
>> with the EPICS controlsystem framework.
>>
>> We have about 20 mvme2100 VME CPU boards which run RTEMS 4.9 with
>> cexp and GeSys.
> This sounds like a nice system.
>
>> We would like to use RTEMS 5 but cexp is not compatible with this version.
>>
>> We are looking for the following features in RTEMS 5:
>>
>>   * dynamic loading of object files
>>   * dynamic linking of objects
>>   * calling functions on the command line (optional)
>>
>> With cexp and RTEMS 4.9, dynamic loading works like this in the startup script:
>>
>>   cexpModuleLoad("Com.obj")
>>   cexpModuleLoad("ca.obj")
>>   cexpModuleLoad("dbStaticIoc.obj")
>>   cexpModuleLoad("registryIoc.obj")
>>   cexpModuleLoad("dbIoc.obj")
>>    ...
> The cexp C parser and caller is not present. I also suspect other alternatives
> such as another language like lua would not help because your existing scripts
> would need to change as well as the related documentation.
Since our startup scripts are generated with perl anyway, using a different syntax would not be a
big problem. EPICS has it's own shell, iocshell, which could also be used for calling functions,
this is the reason why "calling functions" in my list above is optional.
>
>> Is it possible to implement a dynamic linker in RTEMS 5 ? It seems that
>> dynamic loading with dl_open(), dl_sym() and dl_close() is already
>> implemented.
> Dynamic loading is present. I am not across all the features cexp provides so I
> cannot be 100% certain there is a complete match. For example the dlopen API
> currently does not search archives to automatically pull in dependences. I
> avoided this when I first implemented libdl and I now think this feature should
> be added.
What we would like to have is dynamic *linking*. I think this could be implemented on top of
of the dynamic loader which is already present in RTEMS 5. The current API of the loader requires
to know the name of a function and returns a pointer to the function which can then be called.
What we would like to have is that all object files are loaded step by step and references to external
symbols in other object files are resolved automatically. This is what cexpModuleLoad does with the
help of generated symbol table files (as far as I understand it).
>> In another mail it was suggested to adapt cexp for RTEMS 5 but it seems
>> that this product is too hard to maintain and too hardware dependent.
> This is understandable.
>
>> We think that it would make RTEMS even more attractive, if it would
>> incorporate a dynamic loader.
> Do you mean bringing cexp into RTEMS and making it use the libdl loader?
>
> Any work to help ease EPICS integration and maintenance is a good thing.
We actually thought of replacing cexp with a dynamic linker and the iocshell from EPICS
or the RTEMS shell.
>
>> It would be a great alternative to vxWorks.
> I suspect there are other users with this issue. It would be good to have an
> easy upgrade path to RTEMS 5.
>
> Chris
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users

It may be possible that we pay someone to implement the dynamic linker in RTEMS. A
condition would be that the dynamic linker would become part of the RTEMS core
so it is ensured that this feature is maintained in future RTEMS versions.

Greetings.

  Goetz


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://lists.rtems.org/pipermail/users/attachments/20171220/4bd55648/attachment.bin>


More information about the users mailing list