About dlclose in rtl

Chris Johns chrisj at rtems.org
Tue Jun 6 05:20:17 UTC 2017


On 06/06/2017 12:35, xuelin.tian at qkmtech.com wrote:
> Dear all,
> For now, I can generate xxx.rap via rtems-ld, and load & link it to the running
> kernel dynamically.
> But, every time I re-load it after closing (dlcose, and delete some tasks
> manually) the running module, there is something wrong with it. 
> My question is, does dlclose function close the loaded RAP completely? What else
> do I need to do adter dlclose it, like freeing some resources?
> 

The dlclose will remove the resources allocated by the RTL link editor when the
code was loaded and nothing else. Any resources such as object, heap, tasks, or
hooks created by the code remain. It is the responsibility of the xxx.rap code
to make sure it has cleaned up and stopped any tasks etc before dlclose is called.

Chris


More information about the users mailing list