From patchwork Wed Jun 17 14:00:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Dasmohapatra X-Patchwork-Id: 1311219 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=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=sourceware.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=FYx+1rvu; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49n6D34vc8z9sRh for ; Thu, 18 Jun 2020 00:00:51 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D77073893660; Wed, 17 Jun 2020 14:00:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D77073893660 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1592402437; bh=DBI3mRDxk45crg3OARe4OZIL/USiO2LsyY7hwFGcGhs=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=FYx+1rvuJVKztJ86Y8oXqyujQjuH/zHoTI22mevhN7QEfIuU2IcjcmUgqhbX7NaxU npU8a1zGEW3vCpPBck8xp/VXkOydTXl+igBlTxvpLhzWCEmxY8w9gB22KAdGBhoCzR AGJ5vGHKZB2Gk3d6QTbdlJkTVOYXF5bgJDrZkuCA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by sourceware.org (Postfix) with ESMTPS id 8850738930E1 for ; Wed, 17 Jun 2020 14:00:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8850738930E1 Received: from noise.collabora.co.uk (unknown [IPv6:2001:4d48:ad56:3000:88ff:22ff:81f3:30c8]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: vivek) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id A4F262A378B for ; Wed, 17 Jun 2020 15:00:34 +0100 (BST) To: libc-alpha@sourceware.org Subject: [RFC][PATCH v5 01/16] Declare and describe the dlmopen RTLD_SHARED flag Date: Wed, 17 Jun 2020 15:00:09 +0100 Message-Id: <20200617140024.12777-2-vivek@collabora.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20200617140024.12777-1-vivek@collabora.com> References: <20200617140024.12777-1-vivek@collabora.com> X-Spam-Status: No, score=-15.3 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Vivek_Das=C2=A0Mohapatra_via_Libc-alpha?= From: Vivek Dasmohapatra Reply-To: =?utf-8?q?Vivek_Das=C2=A0Mohapatra?= Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" This flag will instruct dlmopen to create a shared object present in the main namespace and accessible from the selected namespace when supplied in the MODE argument. --- bits/dlfcn.h | 7 +++++++ sysdeps/mips/bits/dlfcn.h | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/bits/dlfcn.h b/bits/dlfcn.h index ed67f29bc3..9170059323 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 (proxy) 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. */ diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h index e55262f3aa..fc33fd184e 100644 --- a/sysdeps/mips/bits/dlfcn.h +++ b/sysdeps/mips/bits/dlfcn.h @@ -32,6 +32,13 @@ visible as if the object were linked directly into the program. */ #define RTLD_GLOBAL 0x0004 +/* 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 (proxy) is placed + in the target namespace: This allows multiple namespaces to + share a single instance of a DSO. */ +#define RTLD_SHARED 0x00020 + /* 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. */