From patchwork Wed May 16 17:11:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vivek Dasmohapatra X-Patchwork-Id: 914809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-92574-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="RzYXFqkC"; 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 40mLZN6mrbz9s2R for ; Thu, 17 May 2018 03:11:40 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=dtil7q3kFjdjF+Ey7v/FdI0/H5d1fKRTfmWT06GA/yp 0107STajbFwKTkUnA9waVU70jOYewoM5yP83sRkug9Axe+n0CposuT0PuWuhkqQD JL4jBxkjkBdNXD6xfqrS/WPbhgDR2aoiVZcT6Cxb8agV6T8c5j6uF/N1Ad1YqAoY = 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:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=dICWH00KDweK0blzJ9eqg9ZviTo=; b=RzYXFqkCqNqyV6SKB QEun8Ce/vrU0KM6/87IKoyPO8cRxfY0p8qAusL6hZtuDR+GV4RCET8xHSURzLRf6 P7dpVwl2s7MI15OZYANOqWO+K0yIU4VSizJhh48Iy7roFo5RYAv2VmmBU7AVWPGQ 731HwEx1buAn3s6PX7jMmfW510= Received: (qmail 59794 invoked by alias); 16 May 2018 17:11:34 -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 58840 invoked by uid 89); 16 May 2018 17:11:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No 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, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=H*r:74c6, HContent-Transfer-Encoding:8bit X-HELO: bhuna.collabora.co.uk From: =?utf-8?q?Vivek_Das=C2=A0Mohapatra?= To: libc-alpha@sourceware.org Cc: =?utf-8?q?Vivek_Das=C2=A0Mohapatra?= Subject: [RFC][PATCH v1 1/5] bits/dlfcn.h: Declare and describe the dlmopen RTLD_SHARED flag Date: Wed, 16 May 2018 18:11:20 +0100 Message-Id: <20180516171124.24962-2-vivek@collabora.com> In-Reply-To: <20180516171124.24962-1-vivek@collabora.com> References: <20180516171124.24962-1-vivek@collabora.com> MIME-Version: 1.0 From: Vivek Das Mohapatra This flag will instruct dlmopen to create a shared object present in both the main namespace and the selected namespace when set. --- bits/dlfcn.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bits/dlfcn.h b/bits/dlfcn.h index b0b129b66b..a96270d499 100644 --- a/bits/dlfcn.h +++ b/bits/dlfcn.h @@ -32,6 +32,13 @@ visible as if the object were linked directly into the program. */ #define RTLD_GLOBAL 0x00100 +/* If the following bit is set in the MODE argument to dlmopen + then the target object is loaded into the main namespace (if + it is not already there) and a shallow copy (clone) is placed + in the target namespace: This allows multiple namespaces to + share a single instance of a DSO. */ +#define RTLD_SHARED 0x00080 + /* Unix98 demands the following flag which is the inverse to RTLD_GLOBAL. The implementation does this by default and so we can define the value to zero. */