diff options
author | John Rigby <john.rigby@linaro.org> | 2011-09-23 19:59:46 -0600 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-06-04 19:50:28 +0800 |
commit | dbf0e805077c4d66576e45d994edddb76098924f (patch) | |
tree | 306fa18cb115292b755bfd6d7106f3ca9953681b | |
parent | f98f618a301ba2de43d72223f55f9a26d9e2d5ff (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 56bf93773aa..2122b758870 100644 --- a/debian/rules.d/2-binary-arch.mk +++ b/debian/rules.d/2-binary-arch.mk @@ -146,6 +146,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.* |