From: Nicholas Piggin <npiggin@gmail.com> To: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Nicholas Piggin <npiggin@gmail.com>, linux-kbuild@vger.kernel.org, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, linux-sh@vger.kernel.org Subject: [PATCH v2 1/3] sh: thin archives fix linking Date: Thu, 22 Jun 2017 12:39:27 +0000 [thread overview] Message-ID: <20170622123929.15054-2-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: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: linux-sh@vger.kernel.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/sh/kernel/vsyscall/Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile index 8f0ea5fc835c..efc7a6837ef6 100644 --- a/arch/sh/kernel/vsyscall/Makefile +++ b/arch/sh/kernel/vsyscall/Makefile @@ -1,4 +1,4 @@ -obj-y += vsyscall.o vsyscall-syscall.o +obj-y += vsyscall.o vsyscall-syscall.o vsyscall-syms.o $(obj)/vsyscall-syscall.o: \ $(foreach F,trapa,$(obj)/vsyscall-$F.so) @@ -26,11 +26,13 @@ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE # We also create a special relocatable object that should mirror the symbol # table and layout of the linked DSO. With ld -R we can then refer to # these symbols in the kernel code rather than hand-coded addresses. -extra-y += vsyscall-syms.o -$(obj)/built-in.o: $(obj)/vsyscall-syms.o -$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o - -SYSCFLAGS_vsyscall-syms.o = -r -$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \ +SYSCFLAGS_vsyscall-dummy.o = -r +$(obj)/vsyscall-dummy.o: $(src)/vsyscall.lds \ $(obj)/vsyscall-trapa.o $(obj)/vsyscall-note.o FORCE $(call if_changed,syscall) + +quiet_cmd_syscall_syms = SYSCALL $@ + cmd_syscall_syms = $(LD) -r -R $(obj)/vsyscall-dummy.o -o $@ + +$(obj)/vsyscall-syms.o: $(obj)/vsyscall-dummy.o + $(call if_changed,syscall_syms) -- 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, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, linux-sh@vger.kernel.org Subject: [PATCH v2 1/3] sh: thin archives fix linking Date: Thu, 22 Jun 2017 22:39:27 +1000 [thread overview] Message-ID: <20170622123929.15054-2-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: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: Rich Felker <dalias@libc.org> Cc: linux-sh@vger.kernel.org Signed-off-by: Nicholas Piggin <npiggin@gmail.com> --- arch/sh/kernel/vsyscall/Makefile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/arch/sh/kernel/vsyscall/Makefile b/arch/sh/kernel/vsyscall/Makefile index 8f0ea5fc835c..efc7a6837ef6 100644 --- a/arch/sh/kernel/vsyscall/Makefile +++ b/arch/sh/kernel/vsyscall/Makefile @@ -1,4 +1,4 @@ -obj-y += vsyscall.o vsyscall-syscall.o +obj-y += vsyscall.o vsyscall-syscall.o vsyscall-syms.o $(obj)/vsyscall-syscall.o: \ $(foreach F,trapa,$(obj)/vsyscall-$F.so) @@ -26,11 +26,13 @@ $(obj)/vsyscall-%.so: $(src)/vsyscall.lds $(obj)/vsyscall-%.o FORCE # We also create a special relocatable object that should mirror the symbol # table and layout of the linked DSO. With ld -R we can then refer to # these symbols in the kernel code rather than hand-coded addresses. -extra-y += vsyscall-syms.o -$(obj)/built-in.o: $(obj)/vsyscall-syms.o -$(obj)/built-in.o: ld_flags += -R $(obj)/vsyscall-syms.o - -SYSCFLAGS_vsyscall-syms.o = -r -$(obj)/vsyscall-syms.o: $(src)/vsyscall.lds \ +SYSCFLAGS_vsyscall-dummy.o = -r +$(obj)/vsyscall-dummy.o: $(src)/vsyscall.lds \ $(obj)/vsyscall-trapa.o $(obj)/vsyscall-note.o FORCE $(call if_changed,syscall) + +quiet_cmd_syscall_syms = SYSCALL $@ + cmd_syscall_syms = $(LD) -r -R $(obj)/vsyscall-dummy.o -o $@ + +$(obj)/vsyscall-syms.o: $(obj)/vsyscall-dummy.o + $(call if_changed,syscall_syms) -- 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 ` Nicholas Piggin [this message] 2017-06-22 12:39 ` [PATCH v2 1/3] sh: thin archives fix linking 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 ` [PATCH v2 2/3] ia64: " Nicholas Piggin 2017-06-22 12:39 ` 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-2-npiggin@gmail.com \ --to=npiggin@gmail.com \ --cc=dalias@libc.org \ --cc=linux-kbuild@vger.kernel.org \ --cc=linux-sh@vger.kernel.org \ --cc=yamada.masahiro@socionext.com \ --cc=ysato@users.sourceforge.jp \ /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.