rpms/kernel-xen-2.6/devel kernel.spec, NONE, 1.1.2.1 linux-2.6-use-build-id-ld-option.patch, NONE, 1.1.2.1 xen-build-id.patch, NONE, 1.1.2.1 kernel-xen.spec, 1.65, NONE

Eduardo Habkost (ehabkost) fedora-extras-commits at redhat.com
Mon Oct 22 20:06:12 UTC 2007


Author: ehabkost

Update of /cvs/pkgs/rpms/kernel-xen-2.6/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28094

Added Files:
      Tag: private-ehabkost-debuginfo-branch
	kernel.spec linux-2.6-use-build-id-ld-option.patch 
	xen-build-id.patch 
Removed Files:
      Tag: private-ehabkost-debuginfo-branch
	kernel-xen.spec 
Log Message:
Rebase over spec from kernel/devel & include build-id patches



***** Error reading new file: [Errno 2] No such file or directory: 'kernel.spec'
linux-2.6-use-build-id-ld-option.patch:

--- NEW FILE linux-2.6-use-build-id-ld-option.patch ---
>From 18991197b4b588255ccabf472ebc84db7b66a19c Mon Sep 17 00:00:00 2001
From: Roland McGrath <roland at redhat.com>
Date: Thu, 19 Jul 2007 01:48:40 -0700
Subject: [PATCH] Use --build-id ld option

This change passes the --build-id when linking the kernel and when linking
modules, if ld supports it.  This is a new GNU ld option that synthesizes an
ELF note section inside the read-only data.  The note in this section contains
unique identifying bits called the "build ID", which are generated so as to be
different for any two linked ELF files that aren't identical.  The build ID
can be recovered from stripped files, memory dumps, etc.  and used to look up
the original program built, locate debuginfo or other details or history
associated with it.  For normal program linking, the compiler passes
--build-id to ld by default, but the option is needed when using ld directly
as we do.

Signed-off-by: Roland McGrath <roland at redhat.com>
Cc: Andi Kleen <ak at suse.de>
Cc: Paul Mackerras <paulus at samba.org>
Cc: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Cc: Richard Henderson <rth at twiddle.net>
Cc: Ivan Kokshaysky <ink at jurassic.park.msu.ru>
Cc: Martin Schwidefsky <schwidefsky at de.ibm.com>
Cc: Heiko Carstens <heiko.carstens at de.ibm.com>
Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
 Makefile |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Index: linux-2.6.21.i686/Makefile
===================================================================
--- linux-2.6.21.i686.orig/Makefile
+++ linux-2.6.21.i686/Makefile
@@ -515,6 +515,12 @@ CFLAGS += $(call cc-option,-Wdeclaration
 # disable pointer signed / unsigned warnings in gcc 4.0
 CFLAGS += $(call cc-option,-Wno-pointer-sign,)
 
+# Use --build-id when available.
+LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
+			      $(call ld-option, -Wl$(comma)--build-id,))
+LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
+LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
+
 # Default kernel image to build when no specific target is given.
 # KBUILD_IMAGE may be overruled on the command line or
 # set in the environment

xen-build-id.patch:

--- NEW FILE xen-build-id.patch ---
--- xen-3.1.0-src/Config.mk.~1~
+++ xen-3.1.0-src/Config.mk
@@ -52,6 +52,12 @@ define cc-ver-check-closure
     endif
 endef
 
+# ld-option: Check if linker supports first option, else fall back to second.
+# Usage: LDFLAGS_DIRECT += $(call ld-option,$(CC),--build-id,)
+ld-option = $(shell if test -z "`$(1) -Wl,$(2) -nostdlib -o /dev/null -xc \
+              /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;)
+
+
 ifneq ($(debug),y)
 CFLAGS += -DNDEBUG
 else
--- xen-3.1.0-src/xen/Rules.mk.~1~
+++ xen-3.1.0-src/xen/Rules.mk
@@ -72,6 +72,9 @@ CFLAGS   := $(strip $(CFLAGS) $(CFLAGS-y
 AFLAGS   := $(strip $(AFLAGS) $(AFLAGS-y))
 AFLAGS   += $(patsubst -std=gnu%,,$(CFLAGS))
 
+# Use --build-id when linking directly; normally the compiler would pass it.
+LDFLAGS_DIRECT += $(ld-option $(CC),--build-id,)
+
 # LDFLAGS are only passed directly to $(LD)
 LDFLAGS  := $(strip $(LDFLAGS) $(LDFLAGS_DIRECT))
 


--- kernel-xen.spec DELETED ---




More information about the fedora-extras-commits mailing list