]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - Makefile
kbuild: Add target debug_kallsyms
[mirror_ubuntu-artful-kernel.git] / Makefile
index 206b2833ee6baccf34a34b469fd54a621a3f486f..5d0ecf11bfa03c6eff62ee0de4736a1cebc88ef7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -722,6 +722,16 @@ quiet_cmd_kallsyms = KSYM    $@
 # Needs to visit scripts/ before $(KALLSYMS) can be used.
 $(KALLSYMS): scripts ;
 
+# Generate some data for debugging strange kallsyms problems
+debug_kallsyms: .tmp_map$(last_kallsyms)
+
+.tmp_map%: .tmp_vmlinux% FORCE
+       ($(OBJDUMP) -h $< | $(AWK) '/^ +[0-9]/{print $$4 " 0 " $$2}'; $(NM) $<) | sort > $@
+
+.tmp_map3: .tmp_map2
+
+.tmp_map2: .tmp_map1
+
 endif # ifdef CONFIG_KALLSYMS
 
 # vmlinux image - including updated kernel symbols