linux/arch/um
David Gow 598f563036 um: Fix overlapping ELF segments when statically linked
When statically linked, the .text section in UML kernels is not page
aligned, causing it to share a page with the executable headers. As
.text and the executable headers have different permissions, this causes
the kernel to wish to map the same page twice (once as headers with r--
permissions, once as .text with r-x permissions), causing a segfault,
and a nasty message printed to the host kernel's dmesg:

"Uhuuh, elf segment at 0000000060000000 requested but the memory is
mapped already"

By aligning the .text to a page boundary (as in the dynamically linked
version in dyn.lds.S), there is no such overlap, and the kernel runs
correctly.

Signed-off-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2020-03-29 23:21:29 +02:00
..
configs um: Cleanup CONFIG_IOSCHED_CFQ 2020-03-29 23:15:22 +02:00
drivers um: Delete never executed timer 2020-03-29 23:21:26 +02:00
include MPX requires recompiling applications, which requires compiler support. 2020-01-30 16:11:50 -08:00
kernel um: Fix overlapping ELF segments when statically linked 2020-03-29 23:21:29 +02:00
os-Linux um: Fix len of file in create_pid_file 2020-03-29 23:20:07 +02:00
scripts License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
.gitignore
Kconfig um: Fix time-travel=inf-cpu with xor/raid6 2020-01-19 22:42:06 +01:00
Kconfig.debug um: Make GCOV depend on !KCOV 2018-12-27 22:48:19 +01:00
Makefile kbuild: remove src and obj from the top Makefile 2019-07-11 00:05:09 +09:00
Makefile-os-Linux
Makefile-skas