From patchwork Thu Nov 21 12:40:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Adhemerval Zanella (Code Review)" X-Patchwork-Id: 1198926 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-107237-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gnutoolchain-gerrit.osci.io Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ZvClZqpR"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47JfKr0G95z9sR0 for ; Thu, 21 Nov 2019 23:40:31 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:in-reply-to:references :reply-to:mime-version:content-transfer-encoding:content-type :message-id; q=dns; s=default; b=W5+cMyfxYjiBdzvn+SkIBEdxqY0NL3O F09he8U4unXYAya0BlEMQs87x5xCElDSXqyIQl5fnfY9OC5g9kDhjqpKQXZx/fl1 U6LJBASDEuKZESKSW9b4YAPfO1LQ4WOFMDiTEhXdNEf03Xfx3cWEZvnwE+49Jcq6 XSXee+XnRjWE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:cc:subject:in-reply-to:references :reply-to:mime-version:content-transfer-encoding:content-type :message-id; s=default; bh=Se8QpguMBKgH2tA7w+yrKRTLwJE=; b=ZvClZ qpR3RisQDsPG24zfYGKXlXFYO0Jpgt5uP1OaRwIT7ZJ9ZffPPIHoTgnQD9B3j9d4 m8vB9QqU/d4hcEMuqvNN7Sj72LVsSa6B0XmuZ7MPvzhMNfY2WMdhRrRhs3fRI3Ab kOIcy0gaf1tcDIShSQXC2ib3Jpxq3ckBE+lUBc= Received: (qmail 80836 invoked by alias); 21 Nov 2019 12:40:26 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 80828 invoked by uid 89); 21 Nov 2019 12:40:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mx1.osci.io X-Gerrit-PatchSet: 4 Date: Thu, 21 Nov 2019 07:40:21 -0500 From: "Sourceware to Gerrit sync (Code Review)" To: Florian Weimer , libc-alpha@sourceware.org Cc: Carlos O'Donell Auto-Submitted: auto-generated X-Gerrit-MessageType: merged Subject: [pushed] Introduce DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x X-Gerrit-Change-Id: Ic7b94a3f7c4719a00ca8e6018088567824da0658 X-Gerrit-Change-Number: 470 X-Gerrit-ChangeURL: X-Gerrit-Commit: fcb04b9aed26a737159ef7be9c5a6ad0994437dc In-Reply-To: References: Reply-To: noreply@gnutoolchain-gerrit.osci.io, fweimer@redhat.com, libc-alpha@sourceware.org, carlos@redhat.com MIME-Version: 1.0 Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Message-Id: <20191121124021.CCC952816F@gnutoolchain-gerrit.osci.io> Sourceware to Gerrit sync has submitted this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/glibc/+/470 ...................................................................... Introduce DL_LOOKUP_FOR_RELOCATE flag for _dl_lookup_symbol_x This will allow changes in dependency processing during non-lazy binding, for more precise processing of NODELETE objects: During initial relocation in dlopen, the fate of NODELETE objects is still unclear, so objects which are depended upon by NODELETE objects cannot immediately be marked as NODELETE. Change-Id: Ic7b94a3f7c4719a00ca8e6018088567824da0658 --- M elf/dl-reloc.c M sysdeps/generic/ldsodefs.h 2 files changed, 5 insertions(+), 1 deletion(-) Approvals: Carlos O'Donell: Looks good to me, approved diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c index 725a074..7f201fe 100644 --- a/elf/dl-reloc.c +++ b/elf/dl-reloc.c @@ -244,7 +244,8 @@ v = (version); \ _lr = _dl_lookup_symbol_x (strtab + (*ref)->st_name, l, (ref), \ scope, v, _tc, \ - DL_LOOKUP_ADD_DEPENDENCY, NULL); \ + DL_LOOKUP_ADD_DEPENDENCY \ + | DL_LOOKUP_FOR_RELOCATE, NULL); \ l->l_lookup_cache.ret = (*ref); \ l->l_lookup_cache.value = _lr; })) \ : l) diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 891049d..9737780 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -917,6 +917,9 @@ DL_LOOKUP_RETURN_NEWEST = 2, /* Set if dl_lookup* called with GSCOPE lock held. */ DL_LOOKUP_GSCOPE_LOCK = 4, + /* Set if dl_lookup is called for non-lazy relocation processing + from _dl_relocate_object in elf/dl-reloc.c. */ + DL_LOOKUP_FOR_RELOCATE = 8, }; /* Lookup versioned symbol. */