diff --git a/debian/bin/gencontrol.py b/debian/bin/gencontrol.py index 9c0070f1e..d3da5db4d 100755 --- a/debian/bin/gencontrol.py +++ b/debian/bin/gencontrol.py @@ -25,6 +25,7 @@ class Gencontrol(Base): 'build': { 'debug-info': config.SchemaItemBoolean(), 'modules': config.SchemaItemBoolean(), + 'vdso': config.SchemaItemBoolean(), }, 'description': { 'parts': config.SchemaItemList(), @@ -369,6 +370,9 @@ class Gencontrol(Base): if extra.get('headers_arch_depends'): extra['headers_arch_depends'].append('%s (= ${binary:Version})' % packages_own[-1]['Package']) + if config_entry_build.get('vdso', False): + makeflags['VDSO'] = True + build_debug = config_entry_build.get('debug-info') if os.getenv('DEBIAN_KERNEL_DISABLE_DEBUG'): diff --git a/debian/changelog b/debian/changelog index 093bf29c6..73a577003 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ linux (4.3.3-6) UNRELEASED; urgency=medium (Closes: #810472) * gpio: Enable GPIO_SYSFS wherever GPIOLIB is enabled (Closes: #810085) * [armhf] udeb: Include usbhid in input-modules (Closes: #809521) + * linux-image-dbg: Include debugging symbols for VDSOs -- Ben Hutchings Fri, 08 Jan 2016 12:08:13 +0000 diff --git a/debian/config/amd64/defines b/debian/config/amd64/defines index 224defcd1..649a067b5 100644 --- a/debian/config/amd64/defines +++ b/debian/config/amd64/defines @@ -8,6 +8,7 @@ kernel-arch: x86 [build] debug-info: true image-file: arch/x86/boot/bzImage +vdso: true [image] bootloaders: grub-pc grub-efi extlinux diff --git a/debian/config/arm64/defines b/debian/config/arm64/defines index eba3b6f2d..6880132da 100644 --- a/debian/config/arm64/defines +++ b/debian/config/arm64/defines @@ -6,6 +6,7 @@ featuresets: [build] debug-info: true image-file: arch/arm64/boot/Image +vdso: true [image] install-stem: vmlinuz diff --git a/debian/config/armhf/defines b/debian/config/armhf/defines index fd62b693d..8f7551f04 100644 --- a/debian/config/armhf/defines +++ b/debian/config/armhf/defines @@ -6,6 +6,7 @@ kernel-arch: arm [build] image-file: arch/arm/boot/zImage +vdso: true [image] suggests: fdutils diff --git a/debian/config/i386/defines b/debian/config/i386/defines index 90f576294..14f3b86ab 100644 --- a/debian/config/i386/defines +++ b/debian/config/i386/defines @@ -7,6 +7,7 @@ kernel-arch: x86 [build] image-file: arch/x86/boot/bzImage +vdso: true [description] part-long-pae: This kernel requires PAE (Physical Address Extension). diff --git a/debian/config/powerpc/defines b/debian/config/powerpc/defines index 8407a7416..24b8b528f 100644 --- a/debian/config/powerpc/defines +++ b/debian/config/powerpc/defines @@ -7,6 +7,7 @@ kernel-arch: powerpc [build] image-file: vmlinux +vdso: true [image] configs: diff --git a/debian/config/powerpcspe/defines b/debian/config/powerpcspe/defines index 667efcfff..adb4bea07 100644 --- a/debian/config/powerpcspe/defines +++ b/debian/config/powerpcspe/defines @@ -5,6 +5,7 @@ kernel-arch: powerpc [build] image-file: vmlinux +vdso: true [image] suggests: mkvmlinuz diff --git a/debian/config/ppc64/defines b/debian/config/ppc64/defines index 98fcc3b6e..7efcb1a95 100644 --- a/debian/config/ppc64/defines +++ b/debian/config/ppc64/defines @@ -5,6 +5,7 @@ kernel-arch: powerpc [build] image-file: vmlinux +vdso: true [image] configs: diff --git a/debian/config/ppc64el/defines b/debian/config/ppc64el/defines index b5ec5ed67..987ab7df1 100644 --- a/debian/config/ppc64el/defines +++ b/debian/config/ppc64el/defines @@ -5,6 +5,7 @@ kernel-arch: powerpc [build] image-file: vmlinux +vdso: true [image] configs: diff --git a/debian/config/s390x/defines b/debian/config/s390x/defines index 5e0ff29ea..30d86c99f 100644 --- a/debian/config/s390x/defines +++ b/debian/config/s390x/defines @@ -5,6 +5,7 @@ kernel-arch: s390 [build] image-file: arch/s390/boot/image +vdso: true [image] bootloaders: s390-tools diff --git a/debian/rules.real b/debian/rules.real index b935f2b1c..9a284baa4 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -429,6 +429,17 @@ ifeq ($(MODULES),True) find $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/ -mindepth 1 -maxdepth 1 \! -name kernel -exec rm {} \+ rm $(DEBUG_DIR)/lib/firmware -rf endif +ifeq ($(VDSO),True) + +$(MAKE_CLEAN) -C $(DIR) vdso_install INSTALL_MOD_PATH='$(CURDIR)'/$(DEBUG_DIR) +# Fix .build-id links + find $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id -name '*.debug' | while read link; do \ + rel_path="$${link#$(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id/}" && \ + mkdir -p "$(DEBUG_DIR)/.build-id/$$(dirname "$$rel_path")" && \ + ln -s -r -L "$$link" "$(DEBUG_DIR)/.build-id/$$rel_path" || \ + exit; \ + done + rm -r $(DEBUG_DIR)/lib/modules/$(REAL_VERSION)/vdso/.build-id +endif # Add symlinks to vmlinux from the locations expected by kdump-tools, # systemtap and others ln -s boot/vmlinux-$(REAL_VERSION) $(DEBUG_DIR)/