From: Sam Ravnborg <sam@ravnborg.org> To: linux arch <linux-arch@vger.kernel.org>, lkml <linux-kernel@vger.kernel.org>, linux-kbuild <linux-kbuild@vger.kernel.org>, Michal Marek <mmarek@suse.cz> Cc: Richard Weinberger <richard@nod.at>, "David S. Miller" <davem@davemloft.net>, Arnaud Lacombe <lacombar@gmail.com>, Andi Kleen <andi@firstfloor.org> Subject: [PATCH 2/4] kbuild: refactor final link of sparc32 Date: Sat, 28 Apr 2012 22:58:39 +0200 [thread overview] Message-ID: <20120428205839.GB7442@merkur.ravnborg.org> (raw) In-Reply-To: <20120428205651.GA7426@merkur.ravnborg.org> >From 8716c7f473ec65c57811bb21095354b813b48898 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Mon, 23 Apr 2012 20:29:07 +0200 Subject: [PATCH 2/4] kbuild: refactor final link of sparc32 sparc32 uses an additional final link to support btfix. Introduce a new set of exported variables in the top-level Makefile to make the extra linking step simpler. sparc32 have hardcoded knowledge of kallsyms support. This fix include support for EXTRA_KALLSYM_PASS=1. The ugly part is that it is hardcoded in the arch/sparc/boot Makefile. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Makefile | 5 +++++ arch/sparc/Makefile | 11 ----------- arch/sparc/boot/Makefile | 14 +++++++++----- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 287aee4..00bf5b1 100644 --- a/Makefile +++ b/Makefile @@ -727,6 +727,11 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) libs-y := $(libs-y1) $(libs-y2) +# externally visible symbols +export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) +export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) +export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds + # Build vmlinux # --------------------------------------------------------------------------- # vmlinux is built from the objects selected by $(vmlinux-init) and diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index eddcfb3..3195f77 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -72,17 +72,6 @@ libs-y += arch/sparc/lib/ drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/ -# Export what is needed by arch/sparc/boot/Makefile -export VMLINUX_INIT VMLINUX_MAIN -VMLINUX_INIT := $(head-y) $(init-y) -VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/ -VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y) -VMLINUX_MAIN += $(drivers-y) $(net-y) - -ifdef CONFIG_KALLSYMS -export kallsyms.o := .tmp_kallsyms2.o -endif - boot := arch/sparc/boot # Default target diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile index d56d199..78f1994 100644 --- a/arch/sparc/boot/Makefile +++ b/arch/sparc/boot/Makefile @@ -39,11 +39,15 @@ define rule_image echo 'cmd_$@ := $(cmd_image)' > $(@D)/.$(@F).cmd endef -BTOBJS := $(patsubst %/, %/built-in.o, $(VMLINUX_INIT)) -BTLIBS := $(patsubst %/, %/built-in.o, $(VMLINUX_MAIN)) -LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \ - --start-group $(BTLIBS) --end-group \ - $(kallsyms.o) $(obj)/btfix.o +# Support for kallsyms +kallsyms-$(CONFIG_KALLSYMS) := .tmp_kallsyms2.o +ifdef KALLSYMS_EXTRA_PASS + kallsyms-$(CONFIG_KALLSYMS) := .tmp_kallsyms3.o +endif + +LDFLAGS_image := -T $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) \ + --start-group $(KBUILD_VMLINUX_MAIN) --end-group \ + $(kallsyms-y) $(obj)/btfix.o # Link the final image including btfixup'ed symbols. # This is a replacement for the link done in the top-level Makefile. -- 1.7.10
WARNING: multiple messages have this Message-ID (diff)
From: Sam Ravnborg <sam@ravnborg.org> To: linux arch <linux-arch@vger.kernel.org>, lkml <linux-kernel@vger.kernel.org>, linux-kbuild <linux-kbuild@vger.kernel.org>, Michal Marek <mmarek@suse.cz> Cc: Richard Weinberger <richard@nod.at>, "David S. Miller" <davem@davemloft.net>, Arnaud Lacombe <lacombar@gmail.com>, Andi Kleen <andi@firstfloor.org> Subject: [PATCH 2/4] kbuild: refactor final link of sparc32 Date: Sat, 28 Apr 2012 22:58:39 +0200 [thread overview] Message-ID: <20120428205839.GB7442@merkur.ravnborg.org> (raw) In-Reply-To: <20120428205651.GA7426@merkur.ravnborg.org> From 8716c7f473ec65c57811bb21095354b813b48898 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg <sam@ravnborg.org> Date: Mon, 23 Apr 2012 20:29:07 +0200 Subject: [PATCH 2/4] kbuild: refactor final link of sparc32 sparc32 uses an additional final link to support btfix. Introduce a new set of exported variables in the top-level Makefile to make the extra linking step simpler. sparc32 have hardcoded knowledge of kallsyms support. This fix include support for EXTRA_KALLSYM_PASS=1. The ugly part is that it is hardcoded in the arch/sparc/boot Makefile. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> --- Makefile | 5 +++++ arch/sparc/Makefile | 11 ----------- arch/sparc/boot/Makefile | 14 +++++++++----- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 287aee4..00bf5b1 100644 --- a/Makefile +++ b/Makefile @@ -727,6 +727,11 @@ libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) libs-y := $(libs-y1) $(libs-y2) +# externally visible symbols +export KBUILD_VMLINUX_INIT := $(head-y) $(init-y) +export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y) +export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds + # Build vmlinux # --------------------------------------------------------------------------- # vmlinux is built from the objects selected by $(vmlinux-init) and diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index eddcfb3..3195f77 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile @@ -72,17 +72,6 @@ libs-y += arch/sparc/lib/ drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/ -# Export what is needed by arch/sparc/boot/Makefile -export VMLINUX_INIT VMLINUX_MAIN -VMLINUX_INIT := $(head-y) $(init-y) -VMLINUX_MAIN := $(core-y) kernel/ mm/ fs/ ipc/ security/ crypto/ block/ -VMLINUX_MAIN += $(patsubst %/, %/lib.a, $(libs-y)) $(libs-y) -VMLINUX_MAIN += $(drivers-y) $(net-y) - -ifdef CONFIG_KALLSYMS -export kallsyms.o := .tmp_kallsyms2.o -endif - boot := arch/sparc/boot # Default target diff --git a/arch/sparc/boot/Makefile b/arch/sparc/boot/Makefile index d56d199..78f1994 100644 --- a/arch/sparc/boot/Makefile +++ b/arch/sparc/boot/Makefile @@ -39,11 +39,15 @@ define rule_image echo 'cmd_$@ := $(cmd_image)' > $(@D)/.$(@F).cmd endef -BTOBJS := $(patsubst %/, %/built-in.o, $(VMLINUX_INIT)) -BTLIBS := $(patsubst %/, %/built-in.o, $(VMLINUX_MAIN)) -LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds $(BTOBJS) \ - --start-group $(BTLIBS) --end-group \ - $(kallsyms.o) $(obj)/btfix.o +# Support for kallsyms +kallsyms-$(CONFIG_KALLSYMS) := .tmp_kallsyms2.o +ifdef KALLSYMS_EXTRA_PASS + kallsyms-$(CONFIG_KALLSYMS) := .tmp_kallsyms3.o +endif + +LDFLAGS_image := -T $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) \ + --start-group $(KBUILD_VMLINUX_MAIN) --end-group \ + $(kallsyms-y) $(obj)/btfix.o # Link the final image including btfixup'ed symbols. # This is a replacement for the link done in the top-level Makefile. -- 1.7.10
next prev parent reply other threads:[~2012-04-28 20:58 UTC|newest] Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-28 20:56 [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile Sam Ravnborg 2012-04-28 20:58 ` [PATCH 1/4] kbuild: drop unused KBUILD_VMLINUX_OBJS from " Sam Ravnborg 2012-04-28 20:58 ` Sam Ravnborg 2012-04-28 20:58 ` Sam Ravnborg [this message] 2012-04-28 20:58 ` [PATCH 2/4] kbuild: refactor final link of sparc32 Sam Ravnborg 2012-04-29 8:27 ` Geert Uytterhoeven 2012-04-28 20:59 ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Sam Ravnborg 2012-04-28 20:59 ` Sam Ravnborg 2012-04-29 8:28 ` Geert Uytterhoeven 2012-04-29 8:28 ` Geert Uytterhoeven 2012-05-04 23:05 ` Michal Marek 2012-05-05 8:29 ` Sam Ravnborg 2012-05-07 23:15 ` Tony Luck 2012-05-08 16:51 ` Sam Ravnborg 2012-05-08 17:39 ` Tony Luck 2012-05-08 17:39 ` Tony Luck 2012-05-08 17:53 ` [PATCH] kbuild: fix ia64 link Sam Ravnborg 2012-05-08 17:53 ` Sam Ravnborg 2012-05-08 17:53 ` Sam Ravnborg 2012-05-10 12:22 ` Michal Marek 2012-05-09 22:58 ` [PATCH 3/4] kbuild: link of vmlinux moved to a script Paul Gortmaker 2012-05-10 5:16 ` Sam Ravnborg 2012-05-10 5:16 ` Sam Ravnborg 2012-05-10 12:22 ` Michal Marek 2012-05-10 12:22 ` Michal Marek 2012-05-10 12:22 ` Michal Marek 2012-05-10 14:44 ` Paul Gortmaker 2012-05-10 14:44 ` Paul Gortmaker 2012-05-15 22:20 ` Michal Marek 2012-09-06 20:43 ` James Hogan 2012-04-28 21:00 ` [PATCH 4/4] kbuild: document KBUILD_LDS, KBUILD_VMLINUX_{INIT,MAIN} and LDFLAGS_vmlinux Sam Ravnborg 2012-04-28 21:00 ` Sam Ravnborg 2012-04-29 8:29 ` Geert Uytterhoeven 2012-04-29 8:29 ` Geert Uytterhoeven 2012-04-29 8:26 ` [PATCH v2 0/4] kbuild: Move vmlinux link out of top-level Makefile Geert Uytterhoeven 2012-04-29 8:26 ` Geert Uytterhoeven 2012-04-29 11:03 ` Sam Ravnborg -- strict thread matches above, loose matches on Subject: below -- 2012-04-24 19:41 [PATCH " Sam Ravnborg 2012-04-24 19:43 ` [PATCH 2/4] kbuild: refactor final link of sparc32 Sam Ravnborg 2012-04-24 19:43 ` 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=20120428205839.GB7442@merkur.ravnborg.org \ --to=sam@ravnborg.org \ --cc=andi@firstfloor.org \ --cc=davem@davemloft.net \ --cc=lacombar@gmail.com \ --cc=linux-arch@vger.kernel.org \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mmarek@suse.cz \ --cc=richard@nod.at \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.