kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS (2nd attempt)
Masahiro Yamada authored
commit 53632ba8 upstream.

If CONFIG_TRIM_UNUSED_KSYMS is enabled and the kernel is built from
a pristine state, the vmlinux is linked twice.

Commit 3fdc7d3f ("kbuild: link vmlinux only once for
CONFIG_TRIM_UNUSED_KSYMS") explains why this happens, but it did not fix
the issue at all.

Now I realized I had applied a wrong patch.

In v1 patch [1], the autoksyms_recursive target correctly recurses to
"$(MAKE) -f $(srctree)/Makefile autoksyms_recursive".

In v2 patch [2], I accidentally dropped the diff line, and it recurses to
"$(MAKE) -f $(srctree)/Makefile vmlinux".

Restore the code I intended in v1.

[1]: https://lore.kernel.org/linux-kbuild/1521045861-22418-8-git-send-email-yamada.masahiro@socionext.com/
[2]: https://lore.kernel.org/linux-kbuild/1521166725-24157-8-git-send-email-yamada.masahiro@socionext.com/

Fixes: 3fdc7d3f

 ("kbuild: link vmlinux only once for CONFIG_TRIM_UNUSED_KSYMS")
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
Tested-by: default avatarSami Tolvanen <samitolvanen@google.com>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
ece98389
Name Last commit Last update
Documentation iio: adc: vf610: fix conversion mode sysfs node name
LICENSES LICENSES: Rename other to deprecated
arch ARM: cns3xxx: Fix refcount leak in cns3xxx_init
block block: fix bio_clone_blkg_association() to associate with proper blkcg_gq
certs certs/blacklist_hashes.c: fix const confusion in certs blacklist
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous
drivers random: update comment from copy_to_user() -> copy_to_iter()
fs afs: Fix dynamic root getattr
include random: quiet urandom warning ratelimit suppression message
init random: handle latent entropy and command line from random_init()
ipc ipc/mqueue: use get_tree_nodev() in mqueue_get_tree()
kernel dma-debug: make things less spammy under memory pressure
lib random: remove ratelimiting for in-kernel unseeded randomness
mm random: move randomize_page() into mm where it belongs
net Revert "net/tls: fix tls_sk_proto_close executed repeatedly"
samples samples/kretprobes: Fix return value if register_kretprobe() failed
scripts modpost: fix section mismatch check for exported init/exit sections
security efi: Do not import certificates from UEFI Secure Boot for T2 Macs
sound ALSA: hda/realtek: Add quirk for Clevo PD70PNT
tools netfilter: nat: really support inet nat without l3 address
usr initramfs: restore default compression behavior
virt KVM: Prevent module exit until all VMs are freed
.clang-format clang-format: Update with the latest for_each macro list
.cocciconfig scripts: add Linux .cocciconfig for coccinelle
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.