lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YzSih2IQkgpWj59C@bergen.fjasle.eu>
Date:   Wed, 28 Sep 2022 21:37:43 +0200
From:   Nicolas Schier <nicolas@...sle.eu>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-arch@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nathan Chancellor <nathan@...nel.org>
Subject: Re: [PATCH v3 4/7] kbuild: move vmlinux.o rule to the top Makefile

On Sun, 25 Sep 2022 03:19:12 +0900 Masahiro Yamada wrote:
> Move the build rules of vmlinux.o out of scripts/link-vmlinux.sh to
> clearly separate 1) pre-modpost, 2) modpost, 3) post-modpost stages.
> This will make furture refactoring possible.

s/furture/future/

> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>
> ---
> 
> (no changes since v1)
> 
>  Makefile                | 5 ++++-
>  scripts/link-vmlinux.sh | 3 ---
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 92413b6de451..b5dfb54b1993 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1142,6 +1142,9 @@ quiet_cmd_autoksyms_h = GEN     $@
>  $(autoksyms_h):
>  	$(call cmd,autoksyms_h)
>  
> +vmlinux.o: autoksyms_recursive $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) FORCE
> +	$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux_o
> +
>  ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
>  
>  # Final link of vmlinux with optional arch pass after final link
> @@ -1149,7 +1152,7 @@ cmd_link-vmlinux =                                                 \
>  	$(CONFIG_SHELL) $< "$(LD)" "$(KBUILD_LDFLAGS)" "$(LDFLAGS_vmlinux)";    \
>  	$(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
>  
> -vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps) FORCE
> +vmlinux: scripts/link-vmlinux.sh vmlinux.o $(KBUILD_LDS) FORCE
>  	+$(call if_changed_dep,link-vmlinux)
>  
>  targets := vmlinux
> diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> index 161bca64e8aa..07486f90d5e2 100755
> --- a/scripts/link-vmlinux.sh
> +++ b/scripts/link-vmlinux.sh
> @@ -214,9 +214,6 @@ if [ "$1" = "clean" ]; then
>  	exit 0
>  fi
>  
> -#link vmlinux.o
> -${MAKE} -f "${srctree}/scripts/Makefile.vmlinux_o"
> -
>  # modpost vmlinux.o to check for section mismatches
>  ${MAKE} -f "${srctree}/scripts/Makefile.modpost" MODPOST_VMLINUX=1
>  
> -- 
> 2.34.1

Reviewed-by: Nicolas Schier <nicolas@...sle.eu>

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ