aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/armv8multi-sources/files/4.13/0015-ARM64-VDSO-fix-makefile-with-gold-linker-as-default.patch')
-rw-r--r--sys-kernel/armv8multi-sources/files/4.13/0015-ARM64-VDSO-fix-makefile-with-gold-linker-as-default.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/sys-kernel/armv8multi-sources/files/4.13/0015-ARM64-VDSO-fix-makefile-with-gold-linker-as-default.patch b/sys-kernel/armv8multi-sources/files/4.13/0015-ARM64-VDSO-fix-makefile-with-gold-linker-as-default.patch
new file mode 100644
index 0000000..6076288
--- /dev/null
+++ b/sys-kernel/armv8multi-sources/files/4.13/0015-ARM64-VDSO-fix-makefile-with-gold-linker-as-default.patch
@@ -0,0 +1,47 @@
+From 87b70a52412f3e1dcb25b04b9e4e6ee35ba23873 Mon Sep 17 00:00:00 2001
+From: Steve Arnold <nerdboy@gentoo.org>
+Date: Mon, 20 Nov 2017 00:14:02 -0800
+Subject: [PATCH] ARM64: VDSO: fix makefile with gold linker as default
+
+* otherwise vdso link fails with mismatched shared/static flags
+
+Signed-off-by: Steve Arnold <nerdboy@gentoo.org>
+---
+ arch/arm64/kernel/vdso/Makefile | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm64/kernel/vdso/Makefile b/arch/arm64/kernel/vdso/Makefile
+index 62c84f7cb01b..aa69bab57f4d 100644
+--- a/arch/arm64/kernel/vdso/Makefile
++++ b/arch/arm64/kernel/vdso/Makefile
+@@ -11,9 +11,13 @@ obj-vdso := gettimeofday.o note.o sigreturn.o
+ targets := $(obj-vdso) vdso.so vdso.so.dbg
+ obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
+
+-ccflags-y := -shared -fno-common -fno-builtin
+-ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 \
+- $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
++ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
++
++VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
++VDSO_LDFLAGS += -nostdlib -shared
++VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
++VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
++VDSO_LDFLAGS += $(call cc-ldoption, -fuse-ld=bfd)
+
+ # Disable gcov profiling for VDSO code
+ GCOV_PROFILE := n
+@@ -54,7 +58,9 @@ $(obj-vdso): %.o: %.S FORCE
+
+ # Actual build commands
+ quiet_cmd_vdsold = VDSOL $@
+- cmd_vdsold = $(CC) $(c_flags) -Wl,-n -Wl,-T $^ -o $@
++ cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
++ -Wl,-n -Wl,-T $^ -o $@
++
+ quiet_cmd_vdsoas = VDSOA $@
+ cmd_vdsoas = $(CC) $(a_flags) -c -o $@ $<
+
+--
+2.15.0
+