public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>,
	Michal Marek <mmarek@suse.com>
Subject: Re: [PATCH] fixdep: trivial: typo fix and correction
Date: Sat, 12 Aug 2017 18:49:49 +0800	[thread overview]
Message-ID: <598EDD4D.80204@cn.fujitsu.com> (raw)
In-Reply-To: <CAK7LNATCsyg+mFGucfQaKGK_74yfW=vz8s4ii64FD9eV=ztUmw@mail.gmail.com>



On 08/12/2017 07:31 AM, Masahiro Yamada wrote:
> Hi.
> 
> 2017-08-10 22:50 GMT+09:00 Cao jin <caoj.fnst@cn.fujitsu.com>:
>> Hi Masahiro-san
>>
>> On 08/10/2017 12:05 AM, Masahiro Yamada wrote:
>>> 2017-08-08 22:20 GMT+09:00 Cao jin <caoj.fnst@cn.fujitsu.com>:
>>>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>>>
>>> Applied to linux-kbuild/fixes.  Thanks!
>>>
>>
>> I want to ask a question via this thread.
>>
>> I am tracing how each kernel source file compiled, and I met mounts-y in
>> init/Makefile, I have trouble in finding the rule which compile
>> $(mounts-y), but I clearly see the files in $(mounts-y) are compiled in
>> the output of `make -n vmlinux`, but the files listed in mounts-y are
>> not listed in obj-y. I think I must miss something, could you give some
>> hint?
>>
> 
> 
> The magic is the following line:
> 
> scripts/Makefile.lib  line 55
> 
> # if $(foo-objs) exists, foo.o is a composite object
> multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip
> $($(m:.o=-objs)) $($(m:.o=-y))), $(m))))
> 
> 
> If foo.o is added to obj-y and foo-objs or foo-y exist,
> they are also expanded.
> 
> 
> 
> 
> 
> If you see init/Makefile, mounts.o is added to obj-y.
> 
> obj-y                          := main.o version.o mounts.o
> 
> 

Finally figured out how $(mounts-y) is compiled and how init/mounts.o is
linked, it is a bit complex than I expected, your hint really helps:)
Thanks you very much, Masahiro-san.

-- 
Sincerely,
Cao jin

      reply	other threads:[~2017-08-12 10:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-08 13:20 [PATCH] fixdep: trivial: typo fix and correction Cao jin
2017-08-09 16:05 ` Masahiro Yamada
2017-08-10 13:50   ` Cao jin
2017-08-11 23:31     ` Masahiro Yamada
2017-08-12 10:49       ` Cao jin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=598EDD4D.80204@cn.fujitsu.com \
    --to=caoj.fnst@cn.fujitsu.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox