From patchwork Mon Jun 10 21:20:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10985515 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D7AEC14BB for ; Mon, 10 Jun 2019 21:25:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C38EC20182 for ; Mon, 10 Jun 2019 21:25:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B4D3628414; Mon, 10 Jun 2019 21:25:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SUSPICIOUS_RECIPS autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6A42227FA5 for ; Mon, 10 Jun 2019 21:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ayoPA4B1MQHDYCaUr2KtyC6X0ziN9QjQhevvVG25KHg=; b=pjz8bYnGq9yAdU DEskM+UNRMw/Ew7YcPJF5kLloHHl8RBLU1h9EaQvr+nbu8JGm+qzsGW0U93Glk0byEcO/HcyNOOtB yMQZjTJvqd2oWE+x156PXycvuRPPnAwNlDP7//msXV5lf2iC9LfwxaB6H9t1pqXenetZszbDDEKvo uapSFQPn16/7nJqrZEvZ4RP24zjuxuKWziEf4dwpqjQHukQdtvMtiRBHyfJSdNNpRkvwMbL4Qu5Mh 8Vf1CRiF2pFSVC7iZ0otFyBo1az6Jj4Eg1pc4qfH5P2c/Qc+i5fiiyHGQ8SuNkTerAMle1TEDSuUN RddW8i360zCOZgGfMxJQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1haRn0-0005Pg-Cv; Mon, 10 Jun 2019 21:25:14 +0000 Received: from 089144193064.atnat0002.highway.a1.net ([89.144.193.64] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1haRin-0000mW-9m; Mon, 10 Jun 2019 21:20:53 +0000 From: Christoph Hellwig To: Greg Ungerer Subject: [PATCH 13/15] binfmt_flat: move the MAX_SHARED_LIBS definition to binfmt_flat.c Date: Mon, 10 Jun 2019 23:20:13 +0200 Message-Id: <20190610212015.9157-14-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190610212015.9157-1-hch@lst.de> References: <20190610212015.9157-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: uclinux-h8-devel@lists.sourceforge.jp, linux-xtensa@linux-xtensa.org, Michal Simek , linux-c6x-dev@linux-c6x.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP MAX_SHARED_LIBS is an implementation detail of the kernel loader, and should be kept away from the file format definition. Signed-off-by: Christoph Hellwig --- fs/binfmt_flat.c | 6 ++++++ include/linux/flat.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c index 114ea225c5a5..2c7f32d5435f 100644 --- a/fs/binfmt_flat.c +++ b/fs/binfmt_flat.c @@ -68,6 +68,12 @@ #define RELOC_FAILED 0xff00ff01 /* Relocation incorrect somewhere */ #define UNLOADED_LIB 0x7ff000ff /* Placeholder for unused library */ +#ifdef CONFIG_BINFMT_SHARED_FLAT +#define MAX_SHARED_LIBS (4) +#else +#define MAX_SHARED_LIBS (1) +#endif + struct lib_info { struct { unsigned long start_code; /* Start of text segment */ diff --git a/include/linux/flat.h b/include/linux/flat.h index 59e892d5fadb..a2232f1bd41b 100644 --- a/include/linux/flat.h +++ b/include/linux/flat.h @@ -12,12 +12,6 @@ #define FLAT_VERSION 0x00000004L -#ifdef CONFIG_BINFMT_SHARED_FLAT -#define MAX_SHARED_LIBS (4) -#else -#define MAX_SHARED_LIBS (1) -#endif - /* * To make everything easier to port and manage cross platform * development, all fields are in network byte order.