summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/vdso32/Makefile
diff options
context:
space:
mode:
authorSumanth Korikkar <sumanthk@linux.ibm.com>2023-06-23 15:12:05 +0200
committerAlexander Gordeev <agordeev@linux.ibm.com>2023-06-28 13:57:10 +0200
commitd15e4314abec83e4f910659437bc809b0889e3a5 (patch)
tree147b5eddc400ecf3f77771c6eca97c84cabb1099 /arch/s390/kernel/vdso32/Makefile
parent27d45655faa83bde1545251b8a576ab4f1a9e731 (diff)
s390/vdso: filter out mno-pic-data-is-text-relative cflag
cmd_vdso_check checks if there are any dynamic relocations in vdso64.so.dbg. When kernel is compiled with -mno-pic-data-is-text-relative, R_390_RELATIVE relocs are generated and this results in kernel build error. kpatch uses -mno-pic-data-is-text-relative option when building the kernel to prevent relative addressing between code and data. The flag avoids relocation error when klp text and data are too far apart kpatch does not patch vdso code and hence the mno-pic-data-is-text-relative flag is not essential. Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/vdso32/Makefile')
-rw-r--r--arch/s390/kernel/vdso32/Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/s390/kernel/vdso32/Makefile b/arch/s390/kernel/vdso32/Makefile
index f310e807709d..23e868b79a6c 100644
--- a/arch/s390/kernel/vdso32/Makefile
+++ b/arch/s390/kernel/vdso32/Makefile
@@ -19,6 +19,7 @@ KBUILD_AFLAGS_32 := $(filter-out -m64,$(KBUILD_AFLAGS))
KBUILD_AFLAGS_32 += -m31 -s
KBUILD_CFLAGS_32 := $(filter-out -m64,$(KBUILD_CFLAGS))
+KBUILD_CFLAGS_32 := $(filter-out -mno-pic-data-is-text-relative,$(KBUILD_CFLAGS_32))
KBUILD_CFLAGS_32 += -m31 -fPIC -shared -fno-common -fno-builtin
LDFLAGS_vdso32.so.dbg += -fPIC -shared -soname=linux-vdso32.so.1 \