diff options
author | John Rigby <john.rigby@linaro.org> | 2011-09-23 19:59:46 -0600 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2011-11-18 20:10:57 -0700 |
commit | 42611a5d3c1d4dff12f96a01aa5994bee5bbad50 (patch) | |
tree | bf826a6fc3d83925d5372b69e16828a998de4823 | |
parent | 75652e123a584779b9f7ec257fe32b3f1323f374 (diff) |
LINARO: PACKAGING: 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.mk | 7 |
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 482bd5ac3ab..ebe5f01fd44 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -155,6 +155,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.* |