linux-next: manual merge of the net-next tree with the kbuild tree
Subsystems (3)
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
scripts/link-vmlinux.sh
between commit:
e167191e4a8a ("kbuild: Parameterize kallsyms generation and correct reporting")
from the kbuild tree and commits:
341dfcf8d78e ("btf: expose BTF info through sysfs")
7fd785685e22 ("btf: rename /sys/kernel/btf/kernel into /sys/kernel/btf/vmlinux")
from the net-next tree.
I fixed it up (I think - see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 71 lines
Cheers,
Stephen Rothwell
diff --cc scripts/link-vmlinux.sh
index 2438a9faf3f1,c31193340108..000000000000
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@@ -56,11 -56,10 +56,11 @@@ modpost_link(
}
# Link of vmlinux
- # ${1} - optional extra .o files
- # ${2} - output file
+ # ${1} - output file
+ # ${@:2} - optional extra .o files
vmlinux_link()
{
+ info LD ${2}
local lds="${objtree}/${KBUILD_LDS}"
local objects
@@@ -139,18 -149,6 +150,18 @@@ kallsyms(
${CC} ${aflags} -c -o ${2} ${afile}
}
+# Perform one step in kallsyms generation, including temporary linking of
+# vmlinux.
+kallsyms_step()
+{
+ kallsymso_prev=${kallsymso}
+ kallsymso=.tmp_kallsyms${1}.o
+ kallsyms_vmlinux=.tmp_vmlinux${1}
+
- vmlinux_link "${kallsymso_prev}" ${kallsyms_vmlinux}
++ vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}
+ kallsyms ${kallsyms_vmlinux} ${kallsymso}
+}
+
# Create map file with all symbols from ${1}
# See mksymap for additional details
mksysmap()
@@@ -228,8 -227,14 +240,15 @@@ ${MAKE} -f "${srctree}/scripts/Makefile
info MODINFO modules.builtin.modinfo
${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo
+ btf_vmlinux_bin_o=""
+ if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
+ if gen_btf .tmp_vmlinux.btf .btf.vmlinux.bin.o ; then
+ btf_vmlinux_bin_o=.btf.vmlinux.bin.o
+ fi
+ fi
+
kallsymso=""
+kallsymso_prev=""
kallsyms_vmlinux=""
if [ -n "${CONFIG_KALLSYMS}" ]; then
@@@ -268,11 -285,8 +287,7 @@@
fi
fi
- vmlinux_link "${kallsymso}" vmlinux
-
- if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then
- gen_btf vmlinux
- fi
-info LD vmlinux
+ vmlinux_link vmlinux "${kallsymso}" "${btf_vmlinux_bin_o}"
if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then
info SORTEX vmlinuxQuoted 11 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
scripts/link-vmlinux.shbetween commit:
e167191e4a8a("kbuild: Parameterize kallsyms generation and correct reporting")
Quoted 8 lines
from the kbuild tree and commits:
341dfcf8d78e("btf: expose BTF info through sysfs")
7fd785685e22("btf: rename/sys/kernel/btf/kernelinto/sys/kernel/btf/vmlinux")from the net-next tree.
I fixed it up (I think - see below) and can carry the fix as necessary.
Thanks, Stephen! Looks good except one minor issue below.
Quoted 15 lines
This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
--
Cheers,
Stephen Rothwellscripts/link-vmlinux.sh +0
-0
scripts/link-vmlinux.sh
Quoted 10 lines
scripts/link-vmlinux.sh +2
-2@@@ -56,11 -56,10 +56,11 @@@ modpost_link( } # Link of vmlinux - # ${1} - optional extra .o files - # ${2} - output file + # ${1} - output file + # ${@:2} - optional extra .o files vmlinux_link() { + info LD ${2}
This needs to be ${1}.
Quoted 53 lines
local lds="${objtree}/${KBUILD_LDS}" local objectsscripts/link-vmlinux.sh +9
-6@@@ -139,18 -149,6 +150,18 @@@ kallsyms( ${CC} ${aflags} -c -o ${2} ${afile} } +# Perform one step in kallsyms generation, including temporary linking of +# vmlinux. +kallsyms_step() +{ + kallsymso_prev=${kallsymso} + kallsymso=.tmp_kallsyms${1}.o + kallsyms_vmlinux=.tmp_vmlinux${1} + - vmlinux_link "${kallsymso_prev}" ${kallsyms_vmlinux} ++ vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o} + kallsyms ${kallsyms_vmlinux} ${kallsymso} +} + # Create map file with all symbols from ${1} # See mksymap for additional details mksysmap()@@@ -228,8 -227,14 +240,15 @@@ ${MAKE} -f "${srctree}/scripts/Makefile info MODINFO modules.builtin.modinfo ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo + btf_vmlinux_bin_o="" + if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then + if gen_btf .tmp_vmlinux.btf .btf.vmlinux.bin.o ; then + btf_vmlinux_bin_o=.btf.vmlinux.bin.o + fi + fi + kallsymso="" +kallsymso_prev="" kallsyms_vmlinux="" if [ -n "${CONFIG_KALLSYMS}" ]; then@@@ -268,11 -285,8 +287,7 @@@ fi fi - vmlinux_link "${kallsymso}" vmlinux - - if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then - gen_btf vmlinux - fi -info LD vmlinux + vmlinux_link vmlinux "${kallsymso}" "${btf_vmlinux_bin_o}" if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then info SORTEX vmlinux
Hi Andrii,
Quoted 2 lines · On Thu, 15 Aug 2019 22:21:29 -0700 Andrii Nakryiko <[email protected]>…
Thanks, Stephen! Looks good except one minor issue below.
Thanks for checking.
Quoted 5 lines
Quoted 3 lines
vmlinux_link()
{
+ info LD ${2}This needs to be ${1}.
At least its only an information message and doesn't affect the build. I will fix my resolution for Monday.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 7 lines · On Fri, 16 Aug 2019 16:01:28 +1000 Stephen Rothwell <[email protected]>…
Quoted 2 lines · On Thu, 15 Aug 2019 22:21:29 -0700 Andrii Nakryiko <[email protected]>…
Thanks, Stephen! Looks good except one minor issue below.
Thanks for checking.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
vmlinux_link()
{
+ info LD ${2}This needs to be ${1}.
At least its only an information message and doesn't affect the build. I will fix my resolution for Monday.
I also fixed it up in today's linux-next (just so people aren't suprised and report it :-)).
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 40 lines · Andrii Nakryiko
Quoted 11 lines · Stephen Rothwell
Hi all,
Today's linux-next merge of the net-next tree got a conflict in:
scripts/link-vmlinux.shbetween commit:
e167191e4a8a("kbuild: Parameterize kallsyms generation and correct reporting")Quoted 8 lines
from the kbuild tree and commits:
341dfcf8d78e("btf: expose BTF info through sysfs")
7fd785685e22("btf: rename/sys/kernel/btf/kernelinto/sys/kernel/btf/vmlinux")from the net-next tree.
I fixed it up (I think - see below) and can carry the fix as necessary.
Thanks, Stephen! Looks good except one minor issue below.
Quoted 17 lines
This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
--
Cheers,
Stephen Rothwellscripts/link-vmlinux.sh +0
-0@@@ -56,11 -56,10 +56,11 @@@ modpost_link( }
Quoted 28 lines
Quoted 8 lines
# Link of vmlinux
- # ${1} - optional extra .o files
- # ${2} - output file
+ # ${1} - output file
+ # ${@:2} - optional extra .o files
vmlinux_link()
{
+ info LD ${2}This needs to be ${1}.
Quoted 17 lines
local lds="${objtree}/${KBUILD_LDS}" local objectsscripts/link-vmlinux.sh +1
-1@@@ -139,18 -149,6 +150,18 @@@ kallsyms( ${CC} ${aflags} -c -o ${2} ${afile} } +# Perform one step in kallsyms generation, including temporary linking of +# vmlinux. +kallsyms_step() +{ + kallsymso_prev=${kallsymso} + kallsymso=.tmp_kallsyms${1}.o + kallsyms_vmlinux=.tmp_vmlinux${1} + - vmlinux_link "${kallsymso_prev}" ${kallsyms_vmlinux} ++ vmlinux_link ${kallsyms_vmlinux} "${kallsymso_prev}" ${btf_vmlinux_bin_o}
Good cleanup on the "optional .o files" reordering! With your ordering change, I think the ""s around ${kallsymso_prev} here are no longer needed (which makes it read a bit more nicely).
Quoted 26 lines
Quoted 26 lines
+ kallsyms ${kallsyms_vmlinux} ${kallsymso}
+}
+
# Create map file with all symbols from ${1}
# See mksymap for additional details
mksysmap()scripts/link-vmlinux.sh +7
-0@@@ -228,8 -227,14 +240,15 @@@ ${MAKE} -f "${srctree}/scripts/Makefile info MODINFO modules.builtin.modinfo ${OBJCOPY} -j .modinfo -O binary vmlinux.o modules.builtin.modinfo + btf_vmlinux_bin_o="" + if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then + if gen_btf .tmp_vmlinux.btf .btf.vmlinux.bin.o ; then + btf_vmlinux_bin_o=.btf.vmlinux.bin.o + fi + fi + kallsymso="" +kallsymso_prev="" kallsyms_vmlinux="" if [ -n "${CONFIG_KALLSYMS}" ]; then@@@ -268,11 -285,8 +287,7 @@@ fi fi
Quoted 7 lines
scripts/link-vmlinux.sh
Quoted 7 lines
-
vmlinux_link"${kallsymso}" vmlinuxscripts/link-vmlinux.sh +1
-4- - if [ -n "${CONFIG_DEBUG_INFO_BTF}" ]; then - gen_btf vmlinux - fi -info LD vmlinux + vmlinux_link vmlinux "${kallsymso}" "${btf_vmlinux_bin_o}"
And, I think, also not here for either trailing argument.
Quoted 3 lines
Quoted 3 lines
if [ -n "${CONFIG_BUILDTIME_EXTABLE_SORT}" ]; then info SORTEX vmlinux
-Kees
Signature · 1 line
Kees Cook