From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFE94C43461 for ; Tue, 8 Sep 2020 07:01:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A74F12192A for ; Tue, 8 Sep 2020 07:01:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728501AbgIHHAx (ORCPT ); Tue, 8 Sep 2020 03:00:53 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:38496 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728995AbgIHHAA (ORCPT ); Tue, 8 Sep 2020 03:00:00 -0400 Received: by mail-oi1-f194.google.com with SMTP id y6so15523657oie.5; Mon, 07 Sep 2020 23:59:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=80BY8rNg7RfD6oxznXYOKPcFZuo8wajfOpZ0OBeC/wY=; b=RqGXWXZ9/kAxQAFSyuC5kqinD3ki4bRUdQCvuUBMdUD+NSJ4wf//toLW3N6/2xpWSI 4xYPmSVXo1d4QZZk7IbFC372rxSH8PBVawRiRmYmwmipDSgE19hyBXsbXcUclHUI7zhl baOaiGDUTAQSKJepnGQgdAa71SHWFs5ktn6Owkl/dVgnAwDE0Yz16m3t3Otw8iiLvA7r CxoqGaf4XmBlVdiZIWvC/J3/bykpfrW+9BIwzaOWT9jAjEWmqwcneAleIhN/4ca92NUu mF/SikMkKKHBiGthrYmeN29uidszA6oEUywvueO8kr6U+rF9Nfnl7SC9t9AToy4lr9RO qjcw== X-Gm-Message-State: AOAM531m5uxK5E5rDhrG78duUtGRrc4iSEER4Gv4Q5UXuKJPX0Br0eRo eu2XDYFr4nVHkqJ/t1i+cPoDfVotTwO2ijrL7sI= X-Google-Smtp-Source: ABdhPJw+Sdn/Kf/NbESMrEGT3ykKzS7L5e1uWHMt5PE98XyXUrM0snkLRMMoZ/Q/NW5lb7vt9j4vz11Ltnr3Qr8PC/E= X-Received: by 2002:aca:b742:: with SMTP id h63mr1711017oif.148.1599548399253; Mon, 07 Sep 2020 23:59:59 -0700 (PDT) MIME-Version: 1.0 References: <20200908042708.2511528-1-masahiroy@kernel.org> In-Reply-To: <20200908042708.2511528-1-masahiroy@kernel.org> From: Geert Uytterhoeven Date: Tue, 8 Sep 2020 08:59:48 +0200 Message-ID: Subject: Re: [PATCH v2] kbuild: preprocess module linker script To: Masahiro Yamada Cc: linux-kbuild , "linux-ia64@vger.kernel.org" , Catalin Marinas , Paul Mackerras , linux-riscv , Will Deacon , Anton Ivanov , Linux-Arch , Richard Weinberger , Russell King , Benjamin Herrenschmidt , Fenghua Yu , Albert Ou , Arnd Bergmann , Jeff Dike , Jessica Yu , linux-um , linux-m68k , Michal Marek , Paul Walmsley , Linux ARM , Tony Luck , Linux Kernel Mailing List , Palmer Dabbelt , Michael Ellerman , linuxppc-dev Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 8, 2020 at 6:29 AM Masahiro Yamada wrote: > There was a request to preprocess the module linker script like we > do for the vmlinux one. (https://lkml.org/lkml/2020/8/21/512) > > The difference between vmlinux.lds and module.lds is that the latter > is needed for external module builds, thus must be cleaned up by > 'make mrproper' instead of 'make clean'. Also, it must be created > by 'make modules_prepare'. > > You cannot put it in arch/$(SRCARCH)/kernel/, which is cleaned up by > 'make clean'. I moved arch/$(SRCARCH)/kernel/module.lds to > arch/$(SRCARCH)/include/asm/module.lds.h, which is included from > scripts/module.lds.S. > > scripts/module.lds is fine because 'make clean' keeps all the > build artifacts under scripts/. > > You can add arch-specific sections in . > > Signed-off-by: Masahiro Yamada > Tested-by: Jessica Yu > Acked-by: Will Deacon > arch/m68k/Makefile | 1 - > .../{kernel/module.lds => include/asm/module.lds.h} | 0 Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds