|
From: | grischka |
Subject: | Re: [Tinycc-devel] Is tcc_add_library supposed to persist? |
Date: | Tue, 6 Aug 2024 11:01:25 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.0; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 06.08.2024 07:31, Eric Raible wrote:
Sorry for the self-reply, but I'm still trying to figure this out. One more piece of information: using -vv I can see that libm.so is only listed as being loaded one time. After that, it is available, but is not listed. Which is weird, b.c. libc.so (for instance) is listed as being loaded every time. Can anyone help me understand what's going on with this? It really makes no sense to me.
Hi, tcc -run usage of shared libraries depends on the behavior of the dlfcn functions: tcc_add_library -> dlopen at libtcc.c:1085 zcc_relocate -> dlsym at tccelf.c:1046 tcc_delete -> dlclose at tccrun.c:179 I'd assume that some systems might under circumstances prefer to keep the SO in memory even when after dlclose it's refcount drops to zero. -- gr
Thanks! - Eric
[Prev in Thread] | Current Thread | [Next in Thread] |