summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.(none)>2005-07-14 20:19:08 +0000
committerSam Ravnborg <sam@mars.(none)>2005-07-14 20:19:08 +0000
commit33bc25eae40c100238a5abe8472cef0cd40226f1 (patch)
treede59b867317a6e4d61c42d81c004520fd4b67fce /Makefile
parentbd5bdd875b29e882f80d2cd6dd1da468641dad2a (diff)
downloadblackbird-op-linux-33bc25eae40c100238a5abe8472cef0cd40226f1.tar.gz
blackbird-op-linux-33bc25eae40c100238a5abe8472cef0cd40226f1.zip
kbuild: Add target debug_kallsyms
From: Keith Owens <kaos@ocs.com.au> Make it easier to generate maps for debugging kallsyms problems. debug_kallsyms is only a debugging target so no help or silent mode. Signed-off-by: Keith Owens <kaos@ocs.com.au> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 206b2833ee6b..5d0ecf11bfa0 100644
--- 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
OpenPOWER on IntegriCloud