]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ARM: 8536/1: mm: hide __start_rodata_section_aligned for non-debug builds
authorArnd Bergmann <arnd@arndb.de>
Fri, 19 Feb 2016 15:41:55 +0000 (16:41 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 22 Feb 2016 11:39:43 +0000 (11:39 +0000)
The __start_rodata_section_aligned is only referenced by the
DEBUG_RODATA code, which is only used when the MMU is enabled,
but the definition fails on !MMU builds:

arch/arm/kernel/vmlinux.lds:702: undefined symbol `SECTION_SHIFT' referenced in expression

This hides the symbol whenever DEBUG_RODATA is disabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 64ac2e74f0b2 ("ARM: 8502/1: mm: mark section-aligned portion of rodata NX")
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/vmlinux.lds.S

index fdca231e150a463bb299a6a7296d7bd6442494b3..96de8924e5181c8f84eedf82f40c1047f25e57de 100644 (file)
@@ -317,12 +317,14 @@ SECTIONS
        STABS_DEBUG
 }
 
+#ifdef CONFIG_DEBUG_RODATA
 /*
  * Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will
  * be the first section-aligned location after __start_rodata. Otherwise,
  * it will be equal to __start_rodata.
  */
 __start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT);
+#endif
 
 /*
  * These must never be empty