diff mbox

[2/2] tile: thin archives fix linking

Message ID 20170621075638.19251-3-npiggin@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Nicholas Piggin June 21, 2017, 7:56 a.m. UTC
The VDSO symbols can't be linked into built-in.o when building with
thin archives, so change this to linking them into the final link.

Cc: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/tile/Makefile             | 2 ++
 arch/tile/kernel/vdso/Makefile | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/arch/tile/Makefile b/arch/tile/Makefile
index 4dc380a519d4..eb43ffb999b6 100644
--- a/arch/tile/Makefile
+++ b/arch/tile/Makefile
@@ -30,6 +30,8 @@  endif
 # In kernel modules, this causes load failures due to unsupported relocations.
 KBUILD_CFLAGS   += -fno-asynchronous-unwind-tables
 
+LDFLAGS_vmlinux	+= -R arch/tile/kernel/vdso/vdso-syms.o
+
 LIBGCC_PATH     := \
   $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLAGS) -print-libgcc-file-name)
 
diff --git a/arch/tile/kernel/vdso/Makefile b/arch/tile/kernel/vdso/Makefile
index c54fff37b5ff..84daaf2c5e2c 100644
--- a/arch/tile/kernel/vdso/Makefile
+++ b/arch/tile/kernel/vdso/Makefile
@@ -50,8 +50,6 @@  $(obj)/vdso.so.dbg: $(src)/vdso.lds $(obj-vdso)
 # 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 += vdso-syms.o
-$(obj)/built-in.o: $(obj)/vdso-syms.o
-$(obj)/built-in.o: ld_flags += -R $(obj)/vdso-syms.o
 
 SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \
                             $(call cc-ldoption, -Wl$(comma)--hash-style=both)