OSDN Git Service

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)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 28 Jun 2023 11:57:10 +0000 (13:57 +0200)
commitd15e4314abec83e4f910659437bc809b0889e3a5
tree147b5eddc400ecf3f77771c6eca97c84cabb1099
parent27d45655faa83bde1545251b8a576ab4f1a9e731
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>
arch/s390/kernel/vdso32/Makefile
arch/s390/kernel/vdso64/Makefile