From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82873 invoked by alias); 3 Aug 2017 19:57:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 82607 invoked by uid 89); 3 Aug 2017 19:57:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=claims, our X-HELO: mail-qt0-f175.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=c4GvVnJM+I4U3F3+5I0x4UmalKnbP/g/mnHpZELTi2Y=; b=BjkcizjMPLbhnZr6RAyoelnEr+tOWvSoJQ0lCyCZC9cu5W70VyMxBDt4yTIYcWLT13 4vEIh6RSst5wEDMfSOCr4J0jVe1EV4y4iPeU3hQAKurYJll8ECsHZzgsmIvcVJ81qeHP KlFmwFIiXzdMsQa9h9lAw5cUMRPgBnabfTONrQ4P34lYg2jFEOKrg5NHnOP2MgjXP1gi aX8ztgPVLeRzFaUQVFQy/3UY9kXvfa7hbyf2GZbjYx/o50L0dOWdQD294heA3y1yVq95 BXwYeM/+cdUMs/PKbSuEuZbZQ7GcGoc/tCVRonpbPNg9nuv+Mj2tDpzKIOuxFUcoJAL6 8S/Q== X-Gm-Message-State: AHYfb5iS95WtfPgbx9XynXfrkTyjF4OvapGJrgNQjjddxd/Xxef3HxU7 NoRl/1FXGqY3G3dbWFe9HA== X-Received: by 10.200.11.67 with SMTP id m3mr4171123qti.265.1501790245816; Thu, 03 Aug 2017 12:57:25 -0700 (PDT) Subject: Re: [PATCH] Add RTLD_RELOAD to dlopen To: Florian Weimer , Samuel Thibault , libc-alpha@sourceware.org References: <20170720191517.xah6rggoaeqgbokf@var.youpi.perso.aquilenet.fr> <20170803143742.xfblxvssyidbl6gs@var.youpi.perso.aquilenet.fr> <214b39b1-782e-e638-e231-3d74b407a7ca@redhat.com> From: Carlos O'Donell Message-ID: Date: Thu, 03 Aug 2017 19:57:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <214b39b1-782e-e638-e231-3d74b407a7ca@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-08/txt/msg00134.txt.bz2 On 08/03/2017 01:26 PM, Florian Weimer wrote: > On 08/03/2017 04:37 PM, Samuel Thibault wrote: >> Hello, >> >> So, is it OK to add this? Considering that dlmopen() brings us far from >> enough factorization for our needs, and dlopen() currently never reloads >> unless a real fat copy of the file is done (hardlinks/symlinks don't >> work, as it is based on st_ino). > > I would still see a discussion of the intended symbol binding behavior. > > What happens if a subsequently loaded object references a duplicated > library? Will it reference the most recent duplicate, or the original > library? > > What happens if libA depends on libB, and you need to duplicate both? > > What happens with RTLD_NEXT in a duplicated object? Will it look at > earlier duplicates, too? > > What happens if you reload libc.so? Your test case assumes that > reloading works for libm.so, but I think even that is a bit of a stretch. Agreed. If we add RTLD_RELOAD the semantics must be clearly documented. We have enough problems with the existing interfaces that I would like to see this documented better if you're adding a new constant. On top of this you need tests for the various semantically different claims we make to show they still work. And it is *not* OK to go in as-is. -- Cheers, Carlos.