Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=18991197b4b588255ccabf472ebc84db7b66a19c
Commit:     18991197b4b588255ccabf472ebc84db7b66a19c
Parent:     da1a679cde9b12d6e331f43d2d92a234f2d1f9b0
Author:     Roland McGrath <[EMAIL PROTECTED]>
AuthorDate: Thu Jul 19 01:48:40 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Jul 19 10:04:48 2007 -0700

    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 <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Cc: Paul Mackerras <[EMAIL PROTECTED]>
    Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Cc: Richard Henderson <[EMAIL PROTECTED]>
    Cc: Ivan Kokshaysky <[EMAIL PROTECTED]>
    Cc: Martin Schwidefsky <[EMAIL PROTECTED]>
    Cc: Heiko Carstens <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 Makefile |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index ddbfcac..eccb03b 100644
--- a/Makefile
+++ b/Makefile
@@ -514,6 +514,12 @@ CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
 # 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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to