aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Rigby <john.rigby@linaro.org>2011-09-23 19:59:46 -0600
committerJohn Rigby <john.rigby@linaro.org>2012-06-25 15:02:34 -0600
commit167962c696186252777bca965a12f0a7b056e1ec (patch)
treee08f186ad4e0a4ed64e5b63c601f88c906e70e72
parent74f57a6866e3970dc3f37f79f47eafa28fc67839 (diff)
LINARO: add .gnu_debuglink sections to .ko files
Kernel module .ko files now have .gnu_debuglink sections pointing to the full unstripped .ko in /usr/lib/debug/.. in the dbgsym ddebs. Signed-off-by: John Rigby <john.rigby@linaro.org>
-rw-r--r--debian/rules.d/2-binary-arch.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index c6429e12b82..93e44b3cce6 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -176,6 +176,13 @@ ifneq ($(skipdbg),true)
$(dbgpkgdir)/usr/lib/debug/boot/vmlinux-$(abi_release)-$*
$(build_cd) $(kmake) $(build_O) modules_install \
INSTALL_MOD_PATH=$(dbgpkgdir)/usr/lib/debug
+ # Add .gnu_debuglink sections to each stripped .ko
+ # pointing to unstripped verson
+ find $(pkgdir) -name '*.ko' | sed 's|$(pkgdir)||' | while read module ; do \
+ $(CROSS_COMPILE)objcopy \
+ --add-gnu-debuglink=$(dbgpkgdir)/usr/lib/debug/$$module \
+ $(pkgdir)/$$module; \
+ done
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/build
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/source
rm -f $(dbgpkgdir)/usr/lib/debug/lib/modules/$(abi_release)-$*/modules.*