From patchwork Thu Jun 13 07:09:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10992853 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 AFAD01515 for ; Thu, 13 Jun 2019 16:38:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EABA2239C for ; Thu, 13 Jun 2019 16:38:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9335B22BF1; Thu, 13 Jun 2019 16:38:09 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,SUSPICIOUS_RECIPS autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 434AC2239C for ; Thu, 13 Jun 2019 16:38:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392669AbfFMQht (ORCPT ); Thu, 13 Jun 2019 12:37:49 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:41334 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730620AbfFMHJ7 (ORCPT ); Thu, 13 Jun 2019 03:09:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=T3Eo5sxQqIJbJF4QyIRsu/lJY1U0q5nAAdAJnHrYrpU=; b=qR4pO6bw2gsxHkiazstPS8oEWM FKYMb2SaaIyHmSdhji58kmzc431ERCifOKrpDxBApHJE7IgtwBxrW369WQGKC5gCVcha1mWTZY5GD WXoqBl37DzrmY0JsK8g33U+Wyb3rYh3Y0I17JyJrurkteICYq36mzW7LqYqtbNHT3RrR2edx/Gr8E pcneECKWd3ucje3iZ3DEOd8MoRsSkZ28YxSsJJqkQvOLon8ZJnGqBbnSEtTFlD00Wf+vC7NzzICEl LEVvWKERR+zQxJSAdCF7ep0QFsP8pht5TIN8z/LZWhp3J67XIPvOn3DOiuEBwHV5zEpePy33Hhk9R DtlhUctg==; Received: from mpp-cp1-natpool-1-013.ethz.ch ([82.130.71.13] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hbJrv-0004VL-4D; Thu, 13 Jun 2019 07:09:55 +0000 From: Christoph Hellwig To: Greg Ungerer Cc: Michal Simek , linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, uclinux-h8-devel@lists.sourceforge.jp, linux-m68k@lists.linux-m68k.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/17] binfmt_flat: move the MAX_SHARED_LIBS definition to binfmt_flat.c Date: Thu, 13 Jun 2019 09:09:01 +0200 Message-Id: <20190613070903.17214-16-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190613070903.17214-1-hch@lst.de> References: <20190613070903.17214-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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 0ca65d51bb01..ccd9843e979e 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 d586bb6e64a7..83977c0ce3de 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.