summaryrefslogtreecommitdiffstats
path: root/arch/tile
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-06-22 08:39:29 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-06-29 20:03:04 -0400
commitd6d62a1c1e2276ee6fb4c25610dbcb39beb62240 (patch)
treea89d914b09d6ea2d80082516b8bda6d341ebeae8 /arch/tile
parent26160371359ea91d8e2bdad6245f39e7ed0c17a3 (diff)
tile: thin archives fix linking
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: Chris Metcalf <cmetcalf@mellanox.com> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'arch/tile')
-rw-r--r--arch/tile/kernel/vdso/Makefile14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/tile/kernel/vdso/Makefile b/arch/tile/kernel/vdso/Makefile
index cf162a23e866..0603ce6f047c 100644
--- a/arch/tile/kernel/vdso/Makefile
+++ b/arch/tile/kernel/vdso/Makefile
@@ -5,13 +5,13 @@ vdso-syms = rt_sigreturn gettimeofday
5obj-vdso = $(patsubst %, v%.o, $(vdso-syms)) 5obj-vdso = $(patsubst %, v%.o, $(vdso-syms))
6 6
7# Build rules 7# Build rules
8targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.lds 8targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.lds vdso-dummy.o
9obj-vdso := $(addprefix $(obj)/, $(obj-vdso)) 9obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
10 10
11# vdso32 is only for tilegx -m32 compat task. 11# vdso32 is only for tilegx -m32 compat task.
12VDSO32-$(CONFIG_COMPAT) := y 12VDSO32-$(CONFIG_COMPAT) := y
13 13
14obj-y += vdso.o 14obj-y += vdso.o vdso-syms.o
15obj-$(VDSO32-y) += vdso32.o 15obj-$(VDSO32-y) += vdso32.o
16extra-y += vdso.lds 16extra-y += vdso.lds
17CPPFLAGS_vdso.lds += -P -C -U$(ARCH) 17CPPFLAGS_vdso.lds += -P -C -U$(ARCH)
@@ -48,16 +48,16 @@ $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso) FORCE
48# We also create a special relocatable object that should mirror the symbol 48# We also create a special relocatable object that should mirror the symbol
49# table and layout of the linked DSO. With ld -R we can then refer to 49# table and layout of the linked DSO. With ld -R we can then refer to
50# these symbols in the kernel code rather than hand-coded addresses. 50# these symbols in the kernel code rather than hand-coded addresses.
51extra-y += vdso-syms.o
52$(obj)/built-in.o: $(obj)/vdso-syms.o
53$(obj)/built-in.o: ld_flags += -R $(obj)/vdso-syms.o
54 51
55SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \ 52SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
56 $(call cc-ldoption, -Wl$(comma)--hash-style=both) 53 $(call cc-ldoption, -Wl$(comma)--hash-style=both)
57SYSCFLAGS_vdso_syms.o = -r 54SYSCFLAGS_vdso_dummy.o = -r
58$(obj)/vdso-syms.o: $(src)/vdso.lds $(obj)/vrt_sigreturn.o FORCE 55$(obj)/vdso-dummy.o: $(src)/vdso.lds $(obj)/vrt_sigreturn.o FORCE
59 $(call if_changed,vdsold) 56 $(call if_changed,vdsold)
60 57
58LDFLAGS_vdso-syms.o := -r -R
59$(obj)/vdso-syms.o: $(obj)/vdso-dummy.o FORCE
60 $(call if_changed,ld)
61 61
62# strip rule for the .so file 62# strip rule for the .so file
63$(obj)/%.so: OBJCOPYFLAGS := -S 63$(obj)/%.so: OBJCOPYFLAGS := -S