Fix kallsyms dependency
PATCH 1/1 Fix kallsyms dependency
Hi,
It appears that kallsyms data is not updated if the kallsyms program is changed. The following patch adds an appropriate dependency.
(if we can make the kallsyms program depend on the targets generated by it, could we drop it from being always built ?)
Makefile +1 -1
@@ -581,7 +581,7 @@ cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE $(call if_changed_dep,as_o_S) -.tmp_kallsyms%.S: .tmp_vmlinux% +.tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS) $(call cmd,kallsyms) .tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
Signature · 4 lines
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial coreQuoted 4 lines · Russell King
Hi,
It appears that kallsyms data is not updated if the kallsyms program is changed. The following patch adds an appropriate dependency.
Added, and implemented your suggestion in scripts/Makefile with a few other CONFIG selections.
Btw. any specific reason to hack kallsyms? Just curious if something shows up in this area.
Patch added for reference.
Sam
===== Makefile 1.510 vs edited =====
Makefile +1 -1
@@ -584,7 +584,7 @@ .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE $(call if_changed_dep,as_o_S) -.tmp_kallsyms%.S: .tmp_vmlinux% +.tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS) $(call cmd,kallsyms) .tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE
===== scripts/Makefile 1.40 vs edited =====
scripts/Makefile +6 -3
@@ -5,11 +5,14 @@ # docproc: Preprocess .tmpl file in order to generate .sgml docs # conmakehash: Create arrays for initializing the kernel console tables -host-progs := conmakehash kallsyms pnmtologo bin2c +host-progs-$(CONFIG_KALLSYMS) += kallsyms +host-progs-$(CONFIG_LOGO) += pnmtologo + +host-progs := $(host-progs-y) conmakehash bin2c always := $(host-progs) -subdir-$(CONFIG_MODVERSIONS) += genksyms -subdir-y += mod +subdir-$(CONFIG_MODVERSIONS) += genksyms +subdir-$(CONFIG_MODULES) += mod # Let clean descend into subdirs subdir- += basic lxdialog kconfig package
Quoted 11 lines · Sam Ravnborg
Quoted 4 lines · Russell King
Hi,
It appears that kallsyms data is not updated if the kallsyms program is changed. The following patch adds an appropriate dependency.
Added, and implemented your suggestion in
scripts/Makefilewith a few other CONFIG selections.Btw. any specific reason to hack kallsyms? Just curious if something shows up in this area.
Yes - later ARM binutils adds extra symbols like "$a" and "$d" to the symbol table as "mapping symbols" (binutils terminology). It's not clear whether these will continue to be visible via normal tools or not, and I was considering getting kallsyms to filter them out.
Depending on the outcome of the binutils side depends whether or not I end up modifying kallsyms to ignore these symbols and whether we end up saying "binutils earlier than <todays latest and greatest release> can not be used for ARM."
If a release of binutils is imminent which solves both the mapping symbol visibility problem and the undefined symbol issue, then I suspect its just all round easier to prevent the ARM kernel being built with older binutils versions.
Signature · 4 lines
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core