About dlclose in rtl
xuelin.tian at qkmtech.com
xuelin.tian at qkmtech.com
Tue Jun 6 07:11:21 UTC 2017
Sure, this makes sense. We need to take care of our own heap, tasks, and so on.
Does dlopen APIs in rtems reset or delete static variables in the same xxx.rap? In linux, dlopen would reset the static variables unless "RTLD_NODELETE" is specified.
Best wishes,
xuelin.tian at qkmtech.com
From: Chris Johns
Date: 2017-06-06 13:20
To: xuelin.tian at qkmtech.com; users at rtems.org
Subject: Re: About dlclose in rtl
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20170606/c1f03098/attachment-0002.html>
More information about the users
mailing list