~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/Makefile.vmlinux_o

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/Makefile.vmlinux_o (Version linux-6.12-rc7) and /scripts/Makefile.vmlinux_o (Version linux-6.0.19)


  1 # SPDX-License-Identifier: GPL-2.0-only             1 # SPDX-License-Identifier: GPL-2.0-only
  2                                                     2 
  3 PHONY := __default                                  3 PHONY := __default
  4 __default: vmlinux.o modules.builtin.modinfo m !!   4 __default: vmlinux.o
  5                                                     5 
  6 include include/config/auto.conf                    6 include include/config/auto.conf
  7 include $(srctree)/scripts/Kbuild.include           7 include $(srctree)/scripts/Kbuild.include
  8                                                     8 
  9 # for objtool                                       9 # for objtool
 10 include $(srctree)/scripts/Makefile.lib            10 include $(srctree)/scripts/Makefile.lib
 11                                                    11 
 12 # Generate a linker script to ensure correct o     12 # Generate a linker script to ensure correct ordering of initcalls for Clang LTO
 13 # --------------------------------------------     13 # ---------------------------------------------------------------------------
 14                                                    14 
 15 quiet_cmd_gen_initcalls_lds = GEN     $@           15 quiet_cmd_gen_initcalls_lds = GEN     $@
 16       cmd_gen_initcalls_lds = \                    16       cmd_gen_initcalls_lds = \
 17         $(PYTHON3) $(srctree)/scripts/jobserve     17         $(PYTHON3) $(srctree)/scripts/jobserver-exec \
 18         $(PERL) $(real-prereqs) > $@               18         $(PERL) $(real-prereqs) > $@
 19                                                    19 
 20 .tmp_initcalls.lds: $(srctree)/scripts/generat     20 .tmp_initcalls.lds: $(srctree)/scripts/generate_initcall_order.pl \
 21                 vmlinux.a $(KBUILD_VMLINUX_LIB !!  21                 $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) FORCE
 22         $(call if_changed,gen_initcalls_lds)       22         $(call if_changed,gen_initcalls_lds)
 23                                                    23 
 24 targets := .tmp_initcalls.lds                      24 targets := .tmp_initcalls.lds
 25                                                    25 
 26 ifdef CONFIG_LTO_CLANG                             26 ifdef CONFIG_LTO_CLANG
 27 initcalls-lds := .tmp_initcalls.lds                27 initcalls-lds := .tmp_initcalls.lds
 28 endif                                              28 endif
 29                                                    29 
 30 # objtool for vmlinux.o                            30 # objtool for vmlinux.o
 31 # --------------------------------------------     31 # ---------------------------------------------------------------------------
 32 #                                                  32 #
 33 # For LTO and IBT, objtool doesn't run on indi     33 # For LTO and IBT, objtool doesn't run on individual translation units.
 34 # Run everything on vmlinux instead.               34 # Run everything on vmlinux instead.
 35                                                    35 
 36 objtool-enabled := $(or $(delay-objtool),$(CON     36 objtool-enabled := $(or $(delay-objtool),$(CONFIG_NOINSTR_VALIDATION))
 37                                                    37 
 38 vmlinux-objtool-args-$(delay-objtool)          !!  38 # Reuse objtool_args defined in scripts/Makefile.lib if LTO or IBT is enabled.
 39 vmlinux-objtool-args-$(CONFIG_GCOV_KERNEL)     !!  39 #
 40 vmlinux-objtool-args-$(CONFIG_NOINSTR_VALIDATI !!  40 # Add some more flags as needed.
 41                                                !!  41 # --no-unreachable and --link might be added twice, but it is fine.
                                                   >>  42 #
                                                   >>  43 # Expand objtool_args to a simple variable to avoid circular reference.
 42                                                    44 
 43 objtool-args = $(vmlinux-objtool-args-y) --lin !!  45 objtool_args := \
                                                   >>  46         $(if $(delay-objtool),$(objtool_args)) \
                                                   >>  47         $(if $(CONFIG_NOINSTR_VALIDATION), --noinstr $(if $(CONFIG_CPU_UNRET_ENTRY), --unret)) \
                                                   >>  48         $(if $(CONFIG_GCOV_KERNEL), --no-unreachable) \
                                                   >>  49         --link
 44                                                    50 
 45 # Link of vmlinux.o used for section mismatch      51 # Link of vmlinux.o used for section mismatch analysis
 46 # --------------------------------------------     52 # ---------------------------------------------------------------------------
 47                                                    53 
 48 vmlinux-o-ld-args-$(CONFIG_BUILTIN_MODULE_RANG << 
 49                                                << 
 50 quiet_cmd_ld_vmlinux.o = LD      $@                54 quiet_cmd_ld_vmlinux.o = LD      $@
 51       cmd_ld_vmlinux.o = \                         55       cmd_ld_vmlinux.o = \
 52         $(LD) ${KBUILD_LDFLAGS} -r -o $@ \         56         $(LD) ${KBUILD_LDFLAGS} -r -o $@ \
 53         $(vmlinux-o-ld-args-y) \               << 
 54         $(addprefix -T , $(initcalls-lds)) \       57         $(addprefix -T , $(initcalls-lds)) \
 55         --whole-archive vmlinux.a --no-whole-a !!  58         --whole-archive $(KBUILD_VMLINUX_OBJS) --no-whole-archive \
 56         --start-group $(KBUILD_VMLINUX_LIBS) -     59         --start-group $(KBUILD_VMLINUX_LIBS) --end-group \
 57         $(cmd_objtool)                             60         $(cmd_objtool)
 58                                                    61 
 59 define rule_ld_vmlinux.o                           62 define rule_ld_vmlinux.o
 60         $(call cmd_and_savecmd,ld_vmlinux.o)       63         $(call cmd_and_savecmd,ld_vmlinux.o)
 61         $(call cmd,gen_objtooldep)                 64         $(call cmd,gen_objtooldep)
 62 endef                                              65 endef
 63                                                    66 
 64 vmlinux.o: $(initcalls-lds) vmlinux.a $(KBUILD !!  67 vmlinux.o: $(initcalls-lds) $(KBUILD_VMLINUX_OBJS) $(KBUILD_VMLINUX_LIBS) FORCE
 65         $(call if_changed_rule,ld_vmlinux.o)       68         $(call if_changed_rule,ld_vmlinux.o)
 66                                                    69 
 67 targets += vmlinux.o                               70 targets += vmlinux.o
 68                                                    71 
 69 # module.builtin.modinfo                       !!  72 # Add FORCE to the prequisites of a target to force it to be always rebuilt.
 70 # -------------------------------------------- << 
 71                                                << 
 72 OBJCOPYFLAGS_modules.builtin.modinfo := -j .mo << 
 73                                                << 
 74 targets += modules.builtin.modinfo             << 
 75 modules.builtin.modinfo: vmlinux.o FORCE       << 
 76         $(call if_changed,objcopy)             << 
 77                                                << 
 78 # module.builtin                               << 
 79 # -------------------------------------------- << 
 80                                                << 
 81 # The second line aids cases where multiple mo << 
 82                                                << 
 83 quiet_cmd_modules_builtin = GEN     $@         << 
 84       cmd_modules_builtin = \                  << 
 85         tr '\0' '\n' < $< | \                  << 
 86         sed -n 's/^[[:alnum:]:_]*\.file=//p' | << 
 87         tr ' ' '\n' | uniq | sed -e 's:^:kerne << 
 88                                                << 
 89 targets += modules.builtin                     << 
 90 modules.builtin: modules.builtin.modinfo FORCE << 
 91         $(call if_changed,modules_builtin)     << 
 92                                                << 
 93 # Add FORCE to the prerequisites of a target t << 
 94 # --------------------------------------------     73 # ---------------------------------------------------------------------------
 95                                                    74 
 96 PHONY += FORCE                                     75 PHONY += FORCE
 97 FORCE:                                             76 FORCE:
 98                                                    77 
 99 # Read all saved command lines and dependencie     78 # Read all saved command lines and dependencies for the $(targets) we
100 # may be building above, using $(if_changed{,_     79 # may be building above, using $(if_changed{,_dep}). As an
101 # optimization, we don't need to read them if      80 # optimization, we don't need to read them if the target does not
102 # exist, we will rebuild anyway in that case.      81 # exist, we will rebuild anyway in that case.
103                                                    82 
104 existing-targets := $(wildcard $(sort $(target     83 existing-targets := $(wildcard $(sort $(targets)))
105                                                    84 
106 -include $(foreach f,$(existing-targets),$(dir     85 -include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)
107                                                    86 
108 .PHONY: $(PHONY)                                   87 .PHONY: $(PHONY)
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php