Skip to contentSkip to conversation

Add target debug_kallsyms

PATCH In review Keith Owens 2 participants 3 messages Feb 26, 2005 – Mar 14, 2005 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add target debug_kallsyms

Make it easier to generate maps for debugging kallsyms problems. debug_kallsyms is only a debugging target so no help or silent mode.

Makefile +10 -0
Index: linux/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
#1 lore raw
Quoted 4 lines · Keith Owens

Make it easier to generate maps for debugging kallsyms problems. debug_kallsyms is only a debugging target so no help or silent mode.

Applied to my kbuild tree.
I will remove it when we stop see kallsyms reports.

Sam

#2 lore raw
Quoted 7 lines · Sam Ravnborg
Quoted 4 lines · Keith Owens

Make it easier to generate maps for debugging kallsyms problems. debug_kallsyms is only a debugging target so no help or silent mode.

Applied to my kbuild tree.
I will remove it when we stop see kallsyms reports.

Good luck! Most of the kallsyms reports are not really kallsyms bugs, rather they are caused by the kallsyms checking picking up toolchain problems.