]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/vdso: filter out mno-pic-data-is-text-relative cflag
authorSumanth Korikkar <sumanthk@linux.ibm.com>
Fri, 23 Jun 2023 13:12:05 +0000 (15:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:40 +0000 (13:39 +0200)
commit1bc9dd3aea454e695528b4314ecabe6b58d6687c
treeabed2b6ab6a642f80e11d4342acfa09eabd47355
parent6dbeee1608ea3000a5b72a27f9eea74416a97e9b
s390/vdso: filter out mno-pic-data-is-text-relative cflag

[ Upstream commit d15e4314abec83e4f910659437bc809b0889e3a5 ]

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>
Stable-dep-of: 10f705253651 ("s390/vdso: Generate unwind information for C modules")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/vdso32/Makefile
arch/s390/kernel/vdso64/Makefile