Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1950095rwd; Sun, 21 May 2023 09:27:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4n/mBc43Cq3ihhmUDFQek2kXfsHxeH8qPapq6olDNxd053YXINenYSBsEBfLQerQU/IXs9 X-Received: by 2002:a05:6a00:15c7:b0:647:370c:2c2a with SMTP id o7-20020a056a0015c700b00647370c2c2amr10556139pfu.6.1684686459405; Sun, 21 May 2023 09:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684686459; cv=none; d=google.com; s=arc-20160816; b=sifJ+0JEd9VNlDCIXblivuwmHxpXrVlRiY3GCWHcxxUUCSBAOywBWvbQJS0jeN9y6o Uw1Q1rn44rwKozR/9bn3Nq/usWhCeJEkqtLp+CLGqjbuprzzZHsBHm3251K0Y2wT+BEC PC5EX1j80JyV4cz+c8EFtiEgO2X7cUiYin1zTSG7+EwQUx53hO+aSUEZkg21LzzaY4l7 G2C6zuusKIJjJWmqE9zcW2Q2D5aKIBE93KyZ08Iq8g8W6qRSf1lfgEE8JVvV1QRuyhvL xlm5ArouSdRxzwB3PBcqk9ZC//SFzhCa/9dzeQe0hEa3UZtfjRHmNw8I8yCZllditovh iIAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/EDFY8Iu5MRx7jxM1vcqdF9Ut0J9D3Yumlnr9b3yKFM=; b=c4Njf3bpOzxzlJ2duRFYzvKwKxyln7VNQBjdrnC7YkqvaJm+chJNtDSK2n2Ad2hceH 9mHGlTt/JjzpznO93SnZFFAHG8WoVPfWB9fCtfSKfb2N/SlBsmXsb0K9cCb/4DGPd/Q6 G13PKMJuh+q4GEEebHRtS+3V4klmNaGiVEcXW2B6r3A4HVcuCuDCsZg17dyOeuDoo8Ei nlAZE/F9kE+bFT8WA6TPrgwf30nWzEfF/AV5843QFu/ALWp1saYkO72JtCDJB3y6tEPL //emefKr92roHE9XE8x3x3sWd3f/Et9hkW5wYwTsq4HDnSYRbL2rZeSm8nCGkJo/r/0X axYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TdK53FM1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d135-20020a63368d000000b0053053f9837dsi3253747pga.132.2023.05.21.09.27.23; Sun, 21 May 2023 09:27:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TdK53FM1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231163AbjEUQHV (ORCPT + 99 others); Sun, 21 May 2023 12:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231231AbjEUQHF (ORCPT ); Sun, 21 May 2023 12:07:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00F6011F; Sun, 21 May 2023 09:06:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9615561772; Sun, 21 May 2023 16:05:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2B97C4339B; Sun, 21 May 2023 16:05:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684685145; bh=Lm8ksZkkWnLti0mHUlCD6ajjZTqsYY5cMVf9EjewM9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TdK53FM1qRG0L/Rn8FOqvnIfXjt/9/pqd/rYxzvd8FD45CBK1f+Lj2vjvHTu/t1r8 wyyp/1+J8c8OAv41ABbvkhQhWdXcSYSYDCyW9rO//gbwB0Bcqsx2Yn0Qxm9PhF/HVy q/0HI0rD1dD1d43tvXVOTV2Xbp6JvDLifm2actX3GQQC/S8GXhhnZU4P1mSEbCb7N7 zTo2ghmQ3qGMfMTyajqHl8k0fypLWc+IAB1GJvSVW29iWqr5vM3yyVPxIreuMezH7o AofzX+5UJFEL2mJQxvfMSoXIXVuKjtEAuCmcOy1EAT1r24j6yCKogvJcwNfS2iL4FN Zzj5leqHR7Z+A== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Masahiro Yamada Subject: [PATCH v6 17/20] modpost: merge bad_tosec=ALL_EXIT_SECTIONS entries in sectioncheck table Date: Mon, 22 May 2023 01:04:22 +0900 Message-Id: <20230521160426.1881124-18-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230521160426.1881124-1-masahiroy@kernel.org> References: <20230521160426.1881124-1-masahiroy@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is no distinction between TEXT_TO_ANY_EXIT and DATA_TO_ANY_EXIT. Just merge them. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index aea9d6cd243d..b5f7f4811c39 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -844,8 +844,7 @@ static const char *const optim_symbols[] = { "*.constprop.*", NULL }; enum mismatch { TEXT_TO_ANY_INIT, DATA_TO_ANY_INIT, - TEXT_TO_ANY_EXIT, - DATA_TO_ANY_EXIT, + TEXTDATA_TO_ANY_EXIT, XXXINIT_TO_SOME_INIT, XXXEXIT_TO_SOME_EXIT, ANY_INIT_TO_ANY_EXIT, @@ -888,14 +887,9 @@ static const struct sectioncheck sectioncheck[] = { .mismatch = DATA_TO_ANY_INIT, }, { - .fromsec = { TEXT_SECTIONS, NULL }, + .fromsec = { TEXT_SECTIONS, DATA_SECTIONS, NULL }, .bad_tosec = { ALL_EXIT_SECTIONS, NULL }, - .mismatch = TEXT_TO_ANY_EXIT, -}, -{ - .fromsec = { DATA_SECTIONS, NULL }, - .bad_tosec = { ALL_EXIT_SECTIONS, NULL }, - .mismatch = DATA_TO_ANY_EXIT, + .mismatch = TEXTDATA_TO_ANY_EXIT, }, /* Do not reference init code/data from meminit code/data */ { @@ -1162,8 +1156,7 @@ static void default_mismatch_handler(const char *modname, struct elf_info *elf, switch (mismatch->mismatch) { case TEXT_TO_ANY_INIT: case DATA_TO_ANY_INIT: - case TEXT_TO_ANY_EXIT: - case DATA_TO_ANY_EXIT: + case TEXTDATA_TO_ANY_EXIT: case XXXINIT_TO_SOME_INIT: case XXXEXIT_TO_SOME_EXIT: case ANY_INIT_TO_ANY_EXIT: -- 2.39.2