Commit 72b0196
committed
s390/kpatch-build: Restrict -mno-pic-data-is-text-relative flag
s390 -mno-pic-data-is-text-relative prevents relative addressing between
code and data. The cflag option was introduced to avoid PC32 relocation
errors when the kpatch text and data segments are placed far apart.
However, since the Linux kernel commit c98d2ecae08f ("s390/mm: Uncouple
physical vs virtual address spaces"), the kernel, modules, and data
segments remain close to each other, and therefore no longer risk PC32
relocation errors.
Additionally, with the recent kernel commit 04dabb4261c3 ("s390/bug:
Implement __WARN_printf()")
git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git for-next branch,
it has inline assembly which uses string literals as immediate operands.
gcc fails to compile kpatch module when -mno-pic-data-is-text-relative
is used.
Therefore, restrict the use of -mno-pic-data-is-text-relative to kernels
prior to commit c98d2ecae08f.
Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com>1 parent 7552b46 commit 72b0196
1 file changed
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
272 | 281 | | |
273 | 282 | | |
274 | 283 | | |
| |||
1285 | 1294 | | |
1286 | 1295 | | |
1287 | 1296 | | |
1288 | | - | |
| 1297 | + | |
| 1298 | + | |
1289 | 1299 | | |
1290 | 1300 | | |
1291 | 1301 | | |
| |||
0 commit comments