From: Nicholas Piggin <npiggin@gmail.com> To: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Nicholas Piggin <npiggin@gmail.com>, linux-kbuild@vger.kernel.org, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, linux-ia64@vger.kernel.org Subject: [PATCH v2 2/3] ia64: thin archives fix linking Date: Thu, 22 Jun 2017 22:39:28 +1000 [thread overview] Message-ID: <20170622123929.15054-3-npiggin@gmail.com> (raw) In-Reply-To: <20170622123929.15054-1-npiggin@gmail.com> The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking a new object file that is included into the built-in.o. Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: linux-ia64@vger.kernel.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/ia64/kernel/Makefile.gate | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/ia64/kernel/Makefile.gate b/arch/ia64/kernel/Makefile.gate index a32903ada016..e20c711c2b1e 100644 --- a/arch/ia64/kernel/Makefile.gate +++ b/arch/ia64/kernel/Makefile.gate @@ -2,7 +2,9 @@ targets += gate.so gate-syms.o -extra-y += gate.so gate-syms.o gate.lds gate.o +obj-y += gate-syms.o + +extra-y += gate.so gate.lds gate.o CPPFLAGS_gate.lds := -P -C -U$(ARCH) @@ -14,12 +16,12 @@ GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE $(call if_changed,gate) -$(obj)/built-in.o: $(obj)/gate-syms.o -$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o +# create an object file to resolve gate symbols +quiet_cmd_gate_syms = GATESYM $@ + cmd_gate_syms = $(LD) -r -T $(obj)/gate.lds -R $(obj)/gate.o -o $@ -GATECFLAGS_gate-syms.o = -r $(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE - $(call if_changed,gate) + $(call if_changed,gate_syms) # gate-data.o contains the gate DSO image as data in section .data..gate. # We must build gate.so before we can assemble it. -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: Nicholas Piggin <npiggin@gmail.com> To: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Nicholas Piggin <npiggin@gmail.com>, linux-kbuild@vger.kernel.org, Tony Luck <tony.luck@intel.com>, Fenghua Yu <fenghua.yu@intel.com>, linux-ia64@vger.kernel.org Subject: [PATCH v2 2/3] ia64: thin archives fix linking Date: Thu, 22 Jun 2017 12:39:28 +0000 [thread overview] Message-ID: <20170622123929.15054-3-npiggin@gmail.com> (raw) In-Reply-To: <20170622123929.15054-1-npiggin@gmail.com> The VDSO symbols can't be linked into built-in.o when building with thin archives, so change this to linking a new object file that is included into the built-in.o. Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: linux-ia64@vger.kernel.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/ia64/kernel/Makefile.gate | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/ia64/kernel/Makefile.gate b/arch/ia64/kernel/Makefile.gate index a32903ada016..e20c711c2b1e 100644 --- a/arch/ia64/kernel/Makefile.gate +++ b/arch/ia64/kernel/Makefile.gate @@ -2,7 +2,9 @@ targets += gate.so gate-syms.o -extra-y += gate.so gate-syms.o gate.lds gate.o +obj-y += gate-syms.o + +extra-y += gate.so gate.lds gate.o CPPFLAGS_gate.lds := -P -C -U$(ARCH) @@ -14,12 +16,12 @@ GATECFLAGS_gate.so = -shared -s -Wl,-soname=linux-gate.so.1 \ $(obj)/gate.so: $(obj)/gate.lds $(obj)/gate.o FORCE $(call if_changed,gate) -$(obj)/built-in.o: $(obj)/gate-syms.o -$(obj)/built-in.o: ld_flags += -R $(obj)/gate-syms.o +# create an object file to resolve gate symbols +quiet_cmd_gate_syms = GATESYM $@ + cmd_gate_syms = $(LD) -r -T $(obj)/gate.lds -R $(obj)/gate.o -o $@ -GATECFLAGS_gate-syms.o = -r $(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE - $(call if_changed,gate) + $(call if_changed,gate_syms) # gate-data.o contains the gate DSO image as data in section .data..gate. # We must build gate.so before we can assemble it. -- 2.11.0
next prev parent reply other threads:[~2017-06-22 12:39 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-06-22 12:39 [PATCH v2 0/3] fix ia64, tile, sh for thin archives Nicholas Piggin 2017-06-22 12:39 ` [PATCH v2 1/3] sh: thin archives fix linking Nicholas Piggin 2017-06-22 12:39 ` Nicholas Piggin 2017-06-23 3:25 ` Masahiro Yamada 2017-06-23 3:25 ` Masahiro Yamada 2017-06-23 3:50 ` Nicholas Piggin 2017-06-23 3:50 ` Nicholas Piggin 2017-06-23 10:02 ` Masahiro Yamada 2017-06-23 10:02 ` Masahiro Yamada 2017-06-25 3:24 ` Masahiro Yamada 2017-06-25 3:24 ` Masahiro Yamada 2017-06-22 12:39 ` Nicholas Piggin [this message] 2017-06-22 12:39 ` [PATCH v2 2/3] ia64: " Nicholas Piggin 2017-06-23 9:56 ` Masahiro Yamada 2017-06-23 9:56 ` Masahiro Yamada 2017-06-23 13:44 ` Nicholas Piggin 2017-06-23 13:44 ` Nicholas Piggin 2017-06-25 3:26 ` Masahiro Yamada 2017-06-25 3:26 ` Masahiro Yamada 2017-06-22 12:39 ` [PATCH v2 3/3] tile: " Nicholas Piggin 2017-06-25 3:28 ` Masahiro Yamada 2017-06-25 5:23 ` Nicholas Piggin 2017-06-23 3:23 ` [PATCH v2 0/3] fix ia64, tile, sh for thin archives Masahiro Yamada 2017-06-23 3:42 ` Nicholas Piggin
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=20170622123929.15054-3-npiggin@gmail.com \ --to=npiggin@gmail.com \ --cc=fenghua.yu@intel.com \ --cc=linux-ia64@vger.kernel.org \ --cc=linux-kbuild@vger.kernel.org \ --cc=tony.luck@intel.com \ --cc=yamada.masahiro@socionext.com \ /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.