From: Roland McGrath <roland@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: Adrian Bunk <bunk@stusta.de>, David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Move --build-id option
Date: Sun, 22 Jul 2007 23:14:46 -0700 (PDT) [thread overview]
Message-ID: <20070723061446.5DAAC4D0489@magilla.localdomain> (raw)
In-Reply-To: Roland McGrath's message of Sunday, 22 July 2007 23:01:55 -0700 <20070723060155.2B3824D0489@magilla.localdomain>
My original makefile patch to use ld --build-id wound up using it in too
many places. We want it only for the .ko and vmlinux links (and vmlinux
temporary links that determine the vmlinux layout).
Signed-off-by: Roland McGrath <roland@redhat.com>
---
Makefile | 8 +++-----
scripts/Makefile.modpost | 4 ++--
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile
index cd47845..fe6c5dd 100644
--- a/Makefile
+++ b/Makefile
@@ -518,8 +518,6 @@ 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
@@ -616,9 +614,9 @@ export KBUILD_VMLINUX_OBJS := $(vmlinux-all)
# Rule to link vmlinux - also used during CONFIG_KALLSYMS
# May be overridden by arch/$(ARCH)/Makefile
quiet_cmd_vmlinux__ ?= LD $@
- cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@ \
- -T $(vmlinux-lds) $(vmlinux-init) \
- --start-group $(vmlinux-main) --end-group \
+ cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_BUILD_ID) $(LDFLAGS_vmlinux) \
+ -o $@ -T $(vmlinux-lds) $(vmlinux-init) \
+ --start-group $(vmlinux-main) --end-group \
$(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) vmlinux.o FORCE ,$^)
# Generate new vmlinux version
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index c6fcc59..a86a3b1 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -97,8 +97,8 @@ targets += $(modules:.ko=.mod.o)
# Step 6), final link of the modules
quiet_cmd_ld_ko_o = LD [M] $@
- cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_MODULE) -o $@ \
- $(filter-out FORCE,$^)
+ cmd_ld_ko_o = $(LD) $(LDFLAGS) $(LDFLAGS_BUILD_ID) $(LDFLAGS_MODULE) \
+ -o $@ $(filter-out FORCE,$^)
$(modules): %.ko :%.o %.mod.o FORCE
$(call if_changed,ld_ko_o)
next prev parent reply other threads:[~2007-07-23 6:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-22 8:23 "build-id" changes break sparc64 David Miller
2007-07-22 8:59 ` Roland McGrath
2007-07-23 2:18 ` David Miller
2007-07-23 6:01 ` Roland McGrath
2007-07-23 6:13 ` Paul Mackerras
2007-07-23 6:27 ` Sam Ravnborg
2007-07-23 7:26 ` Roland McGrath
2007-07-23 8:14 ` Sam Ravnborg
2007-07-23 8:18 ` Roland McGrath
2007-07-23 8:24 ` Sam Ravnborg
2007-07-23 9:25 ` Alan Modra
2007-07-23 11:49 ` Al Viro
2007-07-23 18:00 ` Sam Ravnborg
2007-07-23 18:56 ` Al Viro
2007-07-23 19:13 ` Adrian Bunk
2007-07-23 19:12 ` Roland McGrath
2007-07-23 19:39 ` Al Viro
2007-07-23 20:05 ` Roland McGrath
2007-07-23 20:33 ` Sam Ravnborg
2007-07-23 6:14 ` Roland McGrath [this message]
2007-07-23 6:42 ` [PATCH] Move --build-id option Sam Ravnborg
2007-07-23 8:09 ` Roland McGrath
2007-07-23 8:12 ` [PATCH] Use LDFLAGS_MODULE only for .ko links Roland McGrath
2007-07-23 8:16 ` Sam Ravnborg
2007-07-23 6:22 ` "build-id" changes break sparc64 Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070723061446.5DAAC4D0489@magilla.localdomain \
--to=roland@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bunk@stusta.de \
--cc=davem@davemloft.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®