diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-05-05 16:22:34 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-05-11 21:46:39 +0900 |
commit | e493f472752000968f5b30aac10391288cfbf5b1 (patch) | |
tree | 31ae37e19f804c2f666741886fb54797d37e18b5 /scripts/link-vmlinux.sh | |
parent | a44abaca0e196cfeef2374ed663b97daa1ad112a (diff) | |
download | linux-e493f472752000968f5b30aac10391288cfbf5b1.tar.gz linux-e493f472752000968f5b30aac10391288cfbf5b1.tar.bz2 linux-e493f472752000968f5b30aac10391288cfbf5b1.zip |
kbuild: generate a list of objects in vmlinux
A *.mod file lists the member objects of a module, but vmlinux does
not have such a file.
Generate this list to allow modpost to know all the member objects.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'scripts/link-vmlinux.sh')
-rwxr-xr-x | scripts/link-vmlinux.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 20f44504a644..eceb3ee7ec06 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -311,6 +311,7 @@ cleanup() rm -f vmlinux.map rm -f vmlinux.o rm -f .vmlinux.d + rm -f .vmlinux.objs } # Use "make V=1" to debug this script @@ -342,6 +343,16 @@ ${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 modpost_link vmlinux.o objtool_link vmlinux.o +# Generate the list of objects in vmlinux +for f in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do + case ${f} in + *.a) + ${AR} t ${f} ;; + *) + echo ${f} ;; + esac +done > .vmlinux.objs + # modpost vmlinux.o to check for section mismatches ${MAKE} -f "${srctree}/scripts/Makefile.modpost" MODPOST_VMLINUX=1 |