kbuild: do not remove 'linux' link in scripts/link-vmlinux.sh
authorMasahiro Yamada <masahiroy@kernel.org>
Thu, 19 Aug 2021 00:57:38 +0000 (09:57 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 2 Sep 2021 23:17:21 +0000 (08:17 +0900)
arch/um/Makefile passes the -f option to the ln command:

  linux: vmlinux
          @echo '  LINK $@'
          $(Q)ln -f $< $@

So, the hard link is always re-created, and the old one is removed
anyway.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
scripts/link-vmlinux.sh

index a6c4d0bce3baebc37ba48fccc9fff8d98ec27bb5..7b9c62e4d54accda977b1b1c150386477ddd3acb 100755 (executable)
@@ -206,7 +206,6 @@ vmlinux_link()
                        -Wl,-T,${lds}                           \
                        ${objects}                              \
                        -lutil -lrt -lpthread
-               rm -f linux
        fi
 }