From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16709 invoked by alias); 3 Dec 2013 01:23:12 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 16699 invoked by uid 89); 3 Dec 2013 01:23:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no version=3.3.2 X-HELO: mail-vb0-f50.google.com Received: from Unknown (HELO mail-vb0-f50.google.com) (209.85.212.50) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 03 Dec 2013 01:23:10 +0000 Received: by mail-vb0-f50.google.com with SMTP id 10so9136091vbe.37 for ; Mon, 02 Dec 2013 17:23:01 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.52.98.132 with SMTP id ei4mr254247vdb.62.1386033781881; Mon, 02 Dec 2013 17:23:01 -0800 (PST) Received: by 10.58.233.106 with HTTP; Mon, 2 Dec 2013 17:23:01 -0800 (PST) In-Reply-To: References: <20131202062442.GA29869@opentech.at> Date: Tue, 03 Dec 2013 01:23:00 -0000 Message-ID: Subject: Re: reload .so without restarting process From: Hatt Tom To: Sam Varshavchik , gcc-help Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00017.txt.bz2 Thanks ! The problem has been resolved . And hereis one question I should get to be clear of . if I link one .so into one executeable file , would this increase the reference count by one already ? so dlclose would not unload that .so until the reference count decrease to zero . 2013/12/2 Sam Varshavchik : > Hatt Tom writes: > >> If I use dlsym() to load the address manually ,will GOT be needed any >> more ? > > > If you always use dlopen(), and the dlsym() to call methods from a .so, you > don't really need to link to it directly, any more, so this is a moot point. > > > >> 2013/12/2 Nicholas Mc Guire : >> > On Mon, 02 Dec 2013, Hatt Tom wrote: >> > >> >> And also : why cannot I dlclose a .so that I've linked my executable >> >> to, in the usual fashion. >> >> >> >> is it because the reference count of that .so would not alwayes to be >> >> zero ? >> >> >> >> It seems puzzling to me ? >> >> >> > how would you ensure consistency of the GOT ? >> > I think the problem is that you would end up with invalid addresses in >> > the GOT >> > as they were setup by ld based on link-time information. >> > >> > thx! >> > hofrat >> >> >> >> -- >> Best Regards! -- Best Regards!