mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
Merge tag 'v6.1' into merge-6.1
Linux 6.1
Conflicts:
Makefile
scripts/kallsyms.c
scripts/link-vmlinux.sh
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
This commit is contained in:
@@ -3,17 +3,15 @@
|
||||
#
|
||||
# link vmlinux
|
||||
#
|
||||
# vmlinux is linked from the objects selected by $(KBUILD_VMLINUX_OBJS) and
|
||||
# $(KBUILD_VMLINUX_LIBS). Most are built-in.a files from top-level directories
|
||||
# in the kernel tree, others are specified in arch/$(ARCH)/Makefile.
|
||||
# vmlinux is linked from the objects in vmlinux.a and $(KBUILD_VMLINUX_LIBS).
|
||||
# vmlinux.a contains objects that are linked unconditionally.
|
||||
# $(KBUILD_VMLINUX_LIBS) are archives which are linked conditionally
|
||||
# (not within --whole-archive), and do not require symbol indexes added.
|
||||
#
|
||||
# vmlinux
|
||||
# ^
|
||||
# |
|
||||
# +--< $(KBUILD_VMLINUX_OBJS)
|
||||
# | +--< init/built-in.a drivers/built-in.a mm/built-in.a + more
|
||||
# +--< vmlinux.a
|
||||
# |
|
||||
# +--< $(KBUILD_VMLINUX_LIBS)
|
||||
# | +--< lib/lib.a + more
|
||||
@@ -67,7 +65,7 @@ vmlinux_link()
|
||||
objs=vmlinux.o
|
||||
libs=
|
||||
else
|
||||
objs="${KBUILD_VMLINUX_OBJS}"
|
||||
objs=vmlinux.a
|
||||
libs="${KBUILD_VMLINUX_LIBS}"
|
||||
fi
|
||||
|
||||
@@ -75,6 +73,8 @@ vmlinux_link()
|
||||
objs="${objs} .vmlinux.export.o"
|
||||
fi
|
||||
|
||||
objs="${objs} init/version-timestamp.o"
|
||||
|
||||
if [ "${SRCARCH}" = "um" ]; then
|
||||
wl=-Wl,
|
||||
ld="${CC}"
|
||||
@@ -161,7 +161,7 @@ kallsyms()
|
||||
fi
|
||||
|
||||
info KSYMS ${2}
|
||||
${NM} -n ${1} | scripts/kallsyms ${kallsymopt} > ${2}
|
||||
scripts/kallsyms ${kallsymopt} ${1} > ${2}
|
||||
}
|
||||
|
||||
# Perform one step in kallsyms generation, including temporary linking of
|
||||
@@ -174,7 +174,8 @@ kallsyms_step()
|
||||
kallsyms_S=${kallsyms_vmlinux}.S
|
||||
|
||||
vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}
|
||||
kallsyms ${kallsyms_vmlinux} ${kallsyms_S}
|
||||
mksysmap ${kallsyms_vmlinux} ${kallsyms_vmlinux}.syms
|
||||
kallsyms ${kallsyms_vmlinux}.syms ${kallsyms_S}
|
||||
|
||||
info AS ${kallsyms_S}
|
||||
${CC} ${NOSTDINC_FLAGS} ${LINUXINCLUDE} ${KBUILD_CPPFLAGS} \
|
||||
@@ -186,6 +187,7 @@ kallsyms_step()
|
||||
# See mksymap for additional details
|
||||
mksysmap()
|
||||
{
|
||||
info NM ${2}
|
||||
${CONFIG_SHELL} "${srctree}/scripts/mksysmap" ${1} ${2}
|
||||
}
|
||||
|
||||
@@ -201,8 +203,6 @@ cleanup()
|
||||
rm -f System.map
|
||||
rm -f vmlinux
|
||||
rm -f vmlinux.map
|
||||
rm -f .vmlinux.objs
|
||||
rm -f .vmlinux.export.c
|
||||
}
|
||||
|
||||
# Use "make V=1" to debug this script
|
||||
@@ -217,55 +217,7 @@ if [ "$1" = "clean" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Update version
|
||||
info GEN .version
|
||||
if [ -r .version ]; then
|
||||
VERSION=$(expr 0$(cat .version) + 1)
|
||||
echo $VERSION > .version
|
||||
else
|
||||
rm -f .version
|
||||
echo 1 > .version
|
||||
fi;
|
||||
|
||||
# final build of init/
|
||||
${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1
|
||||
|
||||
if [ -e scripts/mod/modpost ]; then
|
||||
#link vmlinux.o
|
||||
${MAKE} -f "${srctree}/scripts/Makefile.vmlinux_o"
|
||||
|
||||
# Generate the list of in-tree objects in vmlinux
|
||||
#
|
||||
# This is used to retrieve symbol versions generated by genksyms.
|
||||
for f in ${KBUILD_VMLINUX_OBJS} ${KBUILD_VMLINUX_LIBS}; do
|
||||
case ${f} in
|
||||
*libgcc.a)
|
||||
# Some architectures do '$(CC) --print-libgcc-file-name' to
|
||||
# borrow libgcc.a from the toolchain.
|
||||
# There is no EXPORT_SYMBOL in external objects. Ignore this.
|
||||
;;
|
||||
*.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
|
||||
|
||||
info MODINFO modules.builtin.modinfo
|
||||
${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo
|
||||
|
||||
info GEN modules.builtin
|
||||
# The second line aids cases where multiple modules share the same object.
|
||||
tr '\0' '\n' < modules.builtin.modinfo | sed -n 's/^[[:alnum:]:_]*\.file=//p' |
|
||||
tr ' ' '\n' | uniq | sed -e 's:^:kernel/:' -e 's/$/.ko/' > modules.builtin
|
||||
fi
|
||||
|
||||
if is_enabled CONFIG_MODULES; then
|
||||
${MAKE} -f "${srctree}/scripts/Makefile.vmlinux" .vmlinux.export.o
|
||||
fi
|
||||
${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init init/version-timestamp.o
|
||||
|
||||
btf_vmlinux_bin_o=""
|
||||
if is_enabled CONFIG_DEBUG_INFO_BTF; then
|
||||
@@ -325,7 +277,6 @@ if is_enabled CONFIG_DEBUG_INFO_BTF && is_enabled CONFIG_BPF; then
|
||||
${RESOLVE_BTFIDS} vmlinux
|
||||
fi
|
||||
|
||||
info SYSMAP System.map
|
||||
mksysmap vmlinux System.map
|
||||
|
||||
if is_enabled CONFIG_BUILDTIME_TABLE_SORT; then
|
||||
@@ -338,9 +289,7 @@ fi
|
||||
|
||||
# step a (see comment above)
|
||||
if is_enabled CONFIG_KALLSYMS; then
|
||||
mksysmap ${kallsyms_vmlinux} .tmp_System.map
|
||||
|
||||
if ! cmp -s System.map .tmp_System.map; then
|
||||
if ! cmp -s System.map ${kallsyms_vmlinux}.syms; then
|
||||
echo >&2 Inconsistent kallsyms data
|
||||
echo >&2 Try "make KALLSYMS_EXTRA_PASS=1" as a workaround
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user