diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2018-02-10 17:25:03 +0300 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-03-25 20:01:19 +0300 |
commit | 6358d6e8b9846c2ff6fd1d4ad2809145635dd813 (patch) | |
tree | 3e2ac4f41fef7aaa4207eec852b992f0cfa3b73c /scripts/Makefile.build | |
parent | 1fe7d2bb24d7db6175e0b0a31d8fe03dc6ffb16e (diff) | |
download | linux-6358d6e8b9846c2ff6fd1d4ad2809145635dd813.tar.xz |
kbuild: remove incremental linking option
This removes the old `ld -r` incremental link option, which has not
been selected by any architecture since June 2017.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r-- | scripts/Makefile.build | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index fff770983960..672cf5bfd724 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -458,15 +458,13 @@ $(sort $(subdir-obj-y)): $(subdir-ym) ; # ifdef builtin-target -ifdef CONFIG_THIN_ARCHIVES - cmd_make_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) - cmd_make_empty_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) - quiet_cmd_link_o_target = AR $@ -else - cmd_make_builtin = $(LD) $(ld_flags) -r -o - cmd_make_empty_builtin = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) - quiet_cmd_link_o_target = LD $@ -endif +# built-in.o archives are made with no symbol table or index which +# makes them small and fast, but unable to be used by the linker. +# scripts/link-vmlinux.sh builds an aggregate built-in.o with a symbol +# table and index. +cmd_make_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) +cmd_make_empty_builtin = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) +quiet_cmd_link_o_target = AR $@ # If the list of objects to link is empty, just create an empty built-in.o cmd_link_o_target = $(if $(strip $(obj-y)),\ @@ -499,11 +497,8 @@ $(modorder-target): $(subdir-ym) FORCE ifdef lib-target quiet_cmd_link_l_target = AR $@ -ifdef CONFIG_THIN_ARCHIVES - cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(lib-y) -else - cmd_link_l_target = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@ $(lib-y) -endif +# lib target archives do get a symbol table and index +cmd_link_l_target = rm -f $@; $(AR) rcsTP$(KBUILD_ARFLAGS) $@ $(lib-y) $(lib-target): $(lib-y) FORCE $(call if_changed,link_l_target) @@ -551,13 +546,8 @@ $($(subst $(obj)/,,$(@:.o=-m)))), $^) cmd_link_multi-link = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) -ifdef CONFIG_THIN_ARCHIVES - quiet_cmd_link_multi-y = AR $@ - cmd_link_multi-y = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(link_multi_deps) -else - quiet_cmd_link_multi-y = LD $@ - cmd_link_multi-y = $(cmd_link_multi-link) -endif +quiet_cmd_link_multi-y = AR $@ +cmd_link_multi-y = rm -f $@; $(AR) rcSTP$(KBUILD_ARFLAGS) $@ $(link_multi_deps) quiet_cmd_link_multi-m = LD [M] $@ cmd_link_multi-m = $(cmd_link_multi-link) |