Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5229115ybe; Mon, 9 Sep 2019 23:59:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEf+K2sR2wjKY+Uvb/9YVcqwVw3idLo0cqOy6twrrSAhecpW6YcUE5O7aKAJK/RcB4bWEK X-Received: by 2002:a50:8ad1:: with SMTP id k17mr5915245edk.243.1568098740636; Mon, 09 Sep 2019 23:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568098740; cv=none; d=google.com; s=arc-20160816; b=Xd8hr7TTfuBcwozUasGVAytX/crflLEfjMa4z3799H5HreBtffr9Nx2DIAiJNYI3fd zo/LpHKGFk4Mk953UVKlQmNKH/ijocw5CyMsylD7iPbLyUndmh6GsSUjGSrmVhkQhxxy b6Rf2Hmo0FQ6s1nJV2569ADdXa7t+M3NkkJZckGm5XJft/DS+kFsgh92c2LI2dHs0bfV uMOAuqHLmWK6nVwqhUMd4yjSo4EBwFPiIVJhzf5Wm7K6mVXm7ua9I4a254zw3nV/Ze1h oiHqXgxBMAUTKLT9QZJ4ab0IPeqS0fSQv1ra8u8KLNF/TdYhFDYsKfMhsEGF/B0LfRTi x14w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=qwVV+ymKu24KVZhw2r78oztqOJ1wcoVVFfPTdN1I4Ew=; b=H454FhSufd8XXXDKCsYajjx3eemPSXDW3mm0QQ98RllSwh8OlnbhG/UQUcTU85ywOU lTJQ7z5ZJmvXErt9TeZJost/1fEasJzG2N2SMlA605EVfJL2oVm5EvmWG62QviqGPKop kRaymEDX100G5Q1KldXuJGFavtmHslySJE5Axolx+cvAv2+YLWTdZA3NO3oF0I0B21St U4mb4UAC01oUwOKploe7054s84PsGvtR7A2raDefy5Pi3ZtethWUNAGfiNKH97V7iQdR os8rFGsAGCfpTLY6pEkEoPd41Lm0b++1uUGALvWiQmO797PUh2WTDaOJDDhlElsIgWlx SAnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ESJ4wZNU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ga7si2369200ejb.260.2019.09.09.23.58.36; Mon, 09 Sep 2019 23:59:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ESJ4wZNU; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404151AbfIILek (ORCPT + 99 others); Mon, 9 Sep 2019 07:34:40 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:60119 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404103AbfIILej (ORCPT ); Mon, 9 Sep 2019 07:34:39 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id x89BYPw7012688; Mon, 9 Sep 2019 20:34:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x89BYPw7012688 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1568028866; bh=qwVV+ymKu24KVZhw2r78oztqOJ1wcoVVFfPTdN1I4Ew=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ESJ4wZNUd6jlgvkXG32t74wGRLXE4TB3AQ81jyghI1D1F/YwNuZWxQTFyiu58XRxl SnLmzXb8AyOB/oHunoyhrxmD+EAck/seIvIdyudjQ4pvifp+sX8pUZ+AJF+SiXZk5h laA+1/arZUaoWKmYm9he2aTxCBmJWNl+Yzjs4NQajTucjfrue63e5w8KG49hTNop1V SnWWG4h8cdihm0zGUIaA8XP073uYUr9yI6yOtOUuvYWHFPuCOH3/9Q2Uik7O8ldCA2 BqrymsyaVe9ZUOQfrmK5Azb4wcFfHg+F2zRRUQBCA4CWfyBZRbt9Km4s4jvhpDmID2 psVgmNdqSYaKg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Lucas De Marchi , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] modpost: use __section in the output to *.mod.c Date: Mon, 9 Sep 2019 20:34:23 +0900 Message-Id: <20190909113423.2289-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190909113423.2289-1-yamada.masahiro@socionext.com> References: <20190909113423.2289-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the __section() shorthand. This avoids escaping double-quotes, and improves the readability. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 480c7b60153b..0dd1bb6f6eec 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2159,7 +2159,7 @@ static void add_header(struct buffer *b, struct module *mod) buf_printf(b, "MODULE_INFO(name, KBUILD_MODNAME);\n"); buf_printf(b, "\n"); buf_printf(b, "__visible struct module __this_module\n"); - buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n"); + buf_printf(b, "__section(.gnu.linkonce.this_module) = {\n"); buf_printf(b, "\t.name = KBUILD_MODNAME,\n"); if (mod->has_init) buf_printf(b, "\t.init = init_module,\n"); @@ -2213,8 +2213,7 @@ static int add_versions(struct buffer *b, struct module *mod) buf_printf(b, "\n"); buf_printf(b, "static const struct modversion_info ____versions[]\n"); - buf_printf(b, "__used\n"); - buf_printf(b, "__attribute__((section(\"__versions\"))) = {\n"); + buf_printf(b, "__used __section(__versions) = {\n"); for (s = mod->unres; s; s = s->next) { if (!s->module) -- 2.17.1