# SPDX-License-Identifier: GPL-2.0
# ===========================================================================
# Module versions
# ===========================================================================
#
# Stage one of module building created the following:
# a) The individual .o files used for the module
# b) A <module>.o file which is the .o files above linked together
# c) A <module>.mod file, listing the name of the preliminary <module>.o file,
#    plus all .o files
# d) modules.order, which lists all the modules

# Stage 2 is handled by this file and does the following
# 1) Find all modules listed in modules.order
# 2) modpost is then used to
# 3)  create one <module>.mod.c file per module
# 4)  create one Module.symvers file with CRC for all exported symbols

# Step 3 is used to place certain information in the module's ELF
# section, including information such as:
#   Version magic (see include/linux/vermagic.h for full details)
#     - Kernel release
#     - SMP is CONFIG_SMP
#     - PREEMPT is CONFIG_PREEMPT[_RT]
#     - GCC Version
#   Module info
#     - Module version (MODULE_VERSION)
#     - Module alias'es (MODULE_ALIAS)
#     - Module license (MODULE_LICENSE)
#     - See include/linux/module.h for more details

# Step 4 is solely used to allow module versioning in external modules,
# where the CRC of each module is retrieved from the Module.symvers file.

PHONY := __modpost
__modpost:

include include/config/auto.conf
include $(srctree)/scripts/Kbuild.include

mixed-build-prefix = $(if $(KBUILD_MIXED_TREE),$(KBUILD_MIXED_TREE)/)

MODPOST = scripts/mod/modpost

modpost-args =										\
	$(if $(CONFIG_MODULES),-M)							\
	$(if $(CONFIG_MODVERSIONS),-m)							\
	$(if $(CONFIG_MODULE_SRCVERSION_ALL),-a)					\
	$(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E)					\
	$(if $(KBUILD_MODPOST_WARN),-w)							\
	$(if $(KBUILD_NSDEPS),-d $(MODULES_NSDEPS))					\
	$(if $(CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS)$(KBUILD_NSDEPS),-N)	\
	$(if $(findstring 1, $(KBUILD_EXTRA_WARN)),-W)					\
	-o $@

modpost-deps := $(MODPOST)

# 'make -i -k' ignores compile errors, and builds as many modules as possible.
ifneq ($(findstring i,$(filter-out --%,$(MAKEFLAGS))),)
modpost-args += -n
endif

# Read out modules.order to pass in modpost.
# Otherwise, allmodconfig would fail with "Argument list too long".
ifdef KBUILD_MODULES
modpost-args += -T $(MODORDER)
modpost-deps += $(MODORDER)
endif

ifeq ($(CONFIG_MODULE_SCMVERSION),y)
ifeq ($(KBUILD_EXTMOD),)
module_srcpath := $(srctree)
else
# Get the external module's source path. KBUILD_EXTMOD could either be an
# absolute path or relative path from $(srctree). This makes sure that we
# aren't using a relative path from a separate working directory (O= or
# KBUILD_OUTPUT) since that may not be the actual module's SCM project path. So
# check the path relative to $(srctree) first.
ifneq ($(realpath $(srctree)/$(KBUILD_EXTMOD) 2>/dev/null),)
	module_srcpath := $(srctree)/$(KBUILD_EXTMOD)
else
	module_srcpath := $(KBUILD_EXTMOD)
endif
endif

# Get the SCM version of the module. Sed verifies setlocalversion returns
# a proper revision based on the SCM type, e.g. git, mercurial, or svn.
# Note: relative M= paths are not supported when building the kernel out of the
# srctree since setlocalversion won't be able to find the module srctree.
module_scmversion := $(shell $(srctree)/scripts/setlocalversion $(module_srcpath) | \
	sed -n 's/.*-\(\(g\|hg\)[a-fA-F0-9]\+\(-dirty\)\?\|svn[0-9]\+\).*/\1/p')
ifneq ($(module_scmversion),)
modpost-args += -v $(module_scmversion)
endif
endif

ifeq ($(KBUILD_EXTMOD),)

# Generate the list of in-tree objects in vmlinux
# ---------------------------------------------------------------------------

# This is used to retrieve symbol versions generated by genksyms.
ifdef CONFIG_MODVERSIONS
ifndef KBUILD_MIXED_TREE
vmlinux.symvers Module.symvers: .vmlinux.objs
endif
endif

# Ignore libgcc.a
# Some architectures do '$(CC) --print-libgcc-file-name' to borrow libgcc.a
# from the toolchain, but there is no EXPORT_SYMBOL in it.

quiet_cmd_vmlinux_objs = GEN     $@
      cmd_vmlinux_objs =		\
	for f in $(real-prereqs); do	\
		case $${f} in		\
		*libgcc.a) ;;		\
		*) $(AR) t $${f} ;;	\
		esac			\
	done > $@

quiet_cmd_vmlinux_symvers = GEN     $@
      cmd_vmlinux_symvers = grep "\<vmlinux\s\+EXPORT" $< > $@

quiet_cmd_cat_symvers = GEN     $@
      cmd_cat_symvers = cat $(real-prereqs) > $@

ifndef KBUILD_MIXED_TREE
targets += .vmlinux.objs
.vmlinux.objs: vmlinux.a $(KBUILD_VMLINUX_LIBS) FORCE
	$(call if_changed,vmlinux_objs)
endif

ifdef CONFIG_TRIM_UNUSED_KSYMS
ksym-wl := $(CONFIG_UNUSED_KSYMS_WHITELIST)
ksym-wl := $(if $(filter-out /%, $(ksym-wl)),$(if $(wildcard $(ksym-wl)),,$(srctree)/))$(ksym-wl)
modpost-args += -t $(addprefix -u , $(ksym-wl))
modpost-deps += $(ksym-wl)
endif

ifeq ($(wildcard vmlinux.o),)
missing-input := vmlinux.o
output-symdump := modules-only.symvers
else
modpost-args += vmlinux.o
modpost-deps += vmlinux.o
output-symdump := $(if $(KBUILD_MODULES), Module.symvers, vmlinux.symvers)
endif

ifdef KBUILD_MODULES
targets += vmlinux.symvers
vmlinux.symvers: Module.symvers FORCE
	$(call if_changed,vmlinux_symvers)

__modpost: $(if $(wildcard vmlinux.o),vmlinux.symvers,)
endif

# Overwrite values for mixed building (overwritting makes merges easier)
ifdef KBUILD_MIXED_TREE
targets += Module.symvers
Module.symvers: $(mixed-build-prefix)vmlinux.symvers modules-only.symvers FORCE
	$(call if_changed,cat_symvers)

__modpost: Module.symvers

ifeq ($(wildcard $(mixed-build-prefix)vmlinux.symvers),)
missing-input := $(mixed-build-prefix)vmlinux.symvers
else
missing-input :=
modpost-args += $(addprefix -i ,$(wildcard $(mixed-build-prefix)vmlinux.symvers))
endif
# Note: we don't want to include the vmlinux symbols here because we want to be
# sure we only use the vmlinux symbols from the GKI kernel.
output-symdump := modules-only.symvers
endif

else

# set src + obj - they may be used in the modules's Makefile
obj := $(KBUILD_EXTMOD)
src := $(if $(VPATH),$(VPATH)/)$(obj)

# Include the module's Makefile to find KBUILD_EXTRA_SYMBOLS
include $(kbuild-file)

output-symdump := $(KBUILD_EXTMOD)/Module.symvers

ifeq ($(wildcard Module.symvers),)
missing-input := Module.symvers
else
modpost-args += -i Module.symvers
modpost-deps += Module.symvers
endif

modpost-args += -e $(addprefix -i , $(KBUILD_EXTRA_SYMBOLS))

endif # ($(KBUILD_EXTMOD),)

quiet_cmd_modpost = MODPOST $@
      cmd_modpost = \
	$(if $(missing-input), \
		echo >&2 "WARNING: $(missing-input) is missing."; \
		echo >&2 "         Modules may not have dependencies or modversions."; \
		echo >&2 "         You may get many unresolved symbol errors."; \
		echo >&2 "         You can set KBUILD_MODPOST_WARN=1 to turn errors into warning"; \
		echo >&2 "         if you want to proceed at your own risk.";) \
	$(MODPOST) $(modpost-args)

targets += $(output-symdump)
$(output-symdump): $(modpost-deps) FORCE
	$(call if_changed,modpost)

__modpost: $(output-symdump)
PHONY += FORCE
FORCE:

existing-targets := $(wildcard $(sort $(targets)))

-include $(foreach f,$(existing-targets),$(dir $(f)).$(notdir $(f)).cmd)

.PHONY: $(PHONY)
