Skip to content

Commit 91c617d

Browse files
arndbRussell King
authored andcommitted
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: Arnd Bergmann <arnd@arndb.de> Fixes: 64ac2e7 ("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>
1 parent ac96680 commit 91c617d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎arch/arm/kernel/vmlinux.lds.S‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,12 +317,14 @@ SECTIONS
317317
STABS_DEBUG
318318
}
319319

320+
#ifdef CONFIG_DEBUG_RODATA
320321
/*
321322
* Without CONFIG_DEBUG_ALIGN_RODATA, __start_rodata_section_aligned will
322323
* be the first section-aligned location after __start_rodata. Otherwise,
323324
* it will be equal to __start_rodata.
324325
*/
325326
__start_rodata_section_aligned = ALIGN(__start_rodata, 1 << SECTION_SHIFT);
327+
#endif
326328

327329
/*
328330
* These must never be empty

0 commit comments

Comments
 (0)