Description
Hi XenServer experts,
Several days ago, I ran into an kernel-dom0 source rpm build issue.
1. mcount vs. fentry
My gcc version is 4.8.4, it replaces mcount with fentry. The output binary from my build contains fentry symbol but no mcount symbol, while vmlinuz in DDK/XenServer contains mcount symbol but no fentry symbol. It looks like my gcc version is higher than expected, it's my fault.
However, in /boot/config-3.10.0+2, we can see CONFIG_HAVE_FENTRY=y, is it by purpose?
2. JUMP_LABEL functions are missing
In /boot/config-3.10.0+2, we can see CONFIG_JUMP_LABEL=y and CONFIG_HAVE_ARCH_JUMP_LABEL=y, and my build contains JUMP_LABEL functions, e.g. jump_label_rate_limit, but vmlinuz in DDK/XenServer does not have such JUMP_LABEL functions.
3. kernel symbol crc checksum inconsistency
As we all know, scripts/genksyms/genksyms in kernel source is used to generate symbol crc checksum, like the following,
gcc -E -D_GENKSYMS_ -Wp,-MD,ipset/.ip_set_core.symtypes.d -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.1.2/include -I/lib/modules/3.10.0+2/build/arch/x86/include/ -I/lib/modules/3.10.0+2/build/include -I/lib/modules/3.10.0+2/build/arch/x86/include/uapi/ -I/lib/modules/3.10.0+2/build/arch/x86/include/generated/uapi/ -I/lib/modules/3.10.0+2/build/include/uapi/ -I/lib/modules/3.10.0+2/build/include/generated/uapi/ -include /lib/modules/3.10.0+2/build/include/linux/kconfig.h -D_KERNEL_ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mno-mmx -mno-sse -mpreferred-stack-boundary=6 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-reorder-blocks -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -pg -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(ip_set_core)" -D"KBUILD_MODNAME=KBUILD_STR(ip_set_core)" ipset/ip_set_core.c | /lib/modules/3.10.0+2/build/scripts/genksyms/genksyms
In my own build, a lot of symbols' checksum is different from the one in DDK's /lib/modules/3.10.0+2/build/Module.symvers, see some examples,
my build | DDK |
---|---|
0xac1fba28 ip_set_add | 0x34f5b0bf ip_set_add |
0x8d37175d ip_set_del | 0x2e9ad16c ip_set_del |