Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 8535/1: mm: DEBUG_RODATA makes no sense with XIP_KERNEL

When CONFIG_DEBUG_ALIGN_RODATA is set, we get a link error:

arch/arm/mm/built-in.o:(.data+0x4bc): undefined reference to `__start_rodata_section_aligned'

However, this combination is useless, as XIP_KERNEL implies that all the
RODATA is already marked readonly, so both CONFIG_DEBUG_RODATA and
CONFIG_DEBUG_ALIGN_RODATA (which depends on the other) are not
needed with XIP_KERNEL, and this patches enforces that using a Kconfig
dependency.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 25362dc496ed ("ARM: 8501/1: mm: flip priority of CONFIG_DEBUG_RODATA")
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Arnd Bergmann and committed by
Russell King
ac96680d 8d9f4913

+1 -1
+1 -1
arch/arm/mm/Kconfig
··· 1039 1039 1040 1040 config DEBUG_RODATA 1041 1041 bool "Make kernel text and rodata read-only" 1042 - depends on MMU 1042 + depends on MMU && !XIP_KERNEL 1043 1043 default y if CPU_V7 1044 1044 help 1045 1045 If this is set, kernel text and rodata memory will be made