Add .gnu_debuglink information into kernel modules (Closes: #555549)

From: Ritesh Raj Sarraf

Add .gnu_debuglink information into kernel modules to point to the
correct DWARF enabled kernel module. This is needed by SystemTap to
instrument a kernel module.

svn path=/dists/trunk/linux-2.6/; revision=16153
This commit is contained in:
Ben Hutchings 2010-08-18 01:48:19 +00:00
parent 79fc48200d
commit 96806e61e8
2 changed files with 12 additions and 0 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
linux-2.6 (2.6.35-1~experimental.3) UNRELEASED; urgency=low
[ Ritesh Raj Sarraf ]
* Add .gnu_debuglink information into kernel modules (Closes: #555549)
-- Ben Hutchings <ben@decadent.org.uk> Wed, 18 Aug 2010 02:45:21 +0100
linux-2.6 (2.6.35-1~experimental.2) experimental; urgency=low
* images: Nuke modules.devname on removal. (closes: #590607)

5
debian/rules.real vendored
View File

@ -345,6 +345,11 @@ install-image_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_plain:
DIR='$(DIR)' PACKAGE_DIR='$(PACKAGE_DIR)' INSTALL_DIR='$(INSTALL_DIR)' REAL_VERSION='$(REAL_VERSION)'
ifeq ($(MODULES),True)
+$(MAKE_CLEAN) -C $(DIR) modules_install INSTALL_MOD_PATH='$(CURDIR)'/$(PACKAGE_DIR) INSTALL_MOD_STRIP=1
ifeq ($(DEBUG),True)
find $(PACKAGE_DIR) -name '*.ko' | sed 's|$(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/kernel/||' | while read module ; do \
objcopy --add-gnu-debuglink=$(DIR)/$$module $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/kernel/$$module; \
done
endif
cp $(DIR)/.config $(PACKAGE_DIR)/boot/config-$(REAL_VERSION)
cp $(DIR)/System.map $(PACKAGE_DIR)/boot/System.map-$(REAL_VERSION)
rm $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/{build,source,modules.*}