提交 91c617d7 编写于 作者: A Arnd Bergmann 提交者: Russell King

ARM: 8536/1: mm: hide __start_rodata_section_aligned for non-debug builds

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: NArnd Bergmann <arnd@arndb.de>
Fixes: 64ac2e74 ("ARM: 8502/1: mm: mark section-aligned portion of rodata NX")
Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 ac96680d
...@@ -317,12 +317,14 @@ SECTIONS ...@@ -317,12 +317,14 @@ SECTIONS
STABS_DEBUG STABS_DEBUG
} }
#ifdef CONFIG_DEBUG_RODATA
/* /*
* Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will * Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will
* be the first section-aligned location after __start_rodata. Otherwise, * be the first section-aligned location after __start_rodata. Otherwise,
* it will be equal to __start_rodata. * it will be equal to __start_rodata.
*/ */
__start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT); __start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT);
#endif
/* /*
* These must never be empty * These must never be empty
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册