1.进入linux内核源码目录下,打开Makefile文件,搜索vmlinux,找到cmd_link-vmlinux命令
1179 cmd_link-vmlinux = \
1180 $(CONFIG_SHELL) $< "$(LD)" "$(KBUILD_LDFLAGS)" "$(LDFLAGS_vmlinux)"; \
1181 $(if $(ARCH_POSTLINK), $(MAKE) -f $(ARCH_POSTLINK) $@, true)
sh 第一个依赖 ld.lld --compress-debug-sections=zlib --gc-sections
make 所有目标
1176 ARCH_POSTLINK := $(wildcard $(srctree)/arch/$(SRCARCH)/Makefile.postlink)
1183 vmlinux: scripts/link-vmlinux.sh autoksyms_recursive $(vmlinux-deps)
1184 +$(call if_changed,link-vmlinux)
1185
1186 targets := vmlinux
$(vmlinux-deps):arch/arm/kernel/vmlinux.lds arch/arm/kernel/head.o init/built-in.a usr/built-in.a arch/arm/built-in.a arch/arm/mach-aspeed/built-in.a arch/arm/mach-milbeaut/built-in.a arch/arm/mach-stm32/built-in.a kernel/built-in.a certs/built-in.a mm/built-in.a fs/built-in.a ipc/built-in.a security/built-in.a crypto/built-in.a block/built-in.a arch/arm/lib/built-in.a lib/built-in.a arch/arm/lib/lib.a lib/lib.a drivers/built-in.a sound/built-in.a samples/built-in.a net/built-in.a virt/built-in.a