<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: ????; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Sure, this makes sense. We need to take care of our own heap, tasks, and so on.</div><div>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.</div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>Best wishes,</div><div>xuelin.tian@qkmtech.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:chrisj@rtems.org">Chris Johns</a></div><div><b>Date:</b> 2017-06-06 13:20</div><div><b>To:</b> <a href="mailto:xuelin.tian@qkmtech.com">xuelin.tian@qkmtech.com</a>; <a href="mailto:users@rtems.org">users@rtems.org</a></div><div><b>Subject:</b> Re: About dlclose in rtl</div></div></div><div><div>On 06/06/2017 12:35, xuelin.tian@qkmtech.com wrote:</div>
<div>> Dear all,</div>
<div>> For now, I can generate xxx.rap via rtems-ld, and load & link it to the running</div>
<div>> kernel dynamically.</div>
<div>> But, every time I re-load it after closing (dlcose, and delete some tasks</div>
<div>> manually) the running module, there is something wrong with it. </div>
<div>> My question is, does dlclose function close the loaded RAP completely? What else</div>
<div>> do I need to do adter dlclose it, like freeing some resources?</div>
<div>> </div>
<div> </div>
<div>The dlclose will remove the resources allocated by the RTL link editor when the</div>
<div>code was loaded and nothing else. Any resources such as object, heap, tasks, or</div>
<div>hooks created by the code remain. It is the responsibility of the xxx.rap code</div>
<div>to make sure it has cleaned up and stopped any tasks etc before dlclose is called.</div>
<div> </div>
<div>Chris</div>
</div></blockquote>
</body></html>