From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: mm: hide __start_rodata_section_aligned for non-debug builds
Date: Tue, 16 Feb 2016 17:03:27 +0100 [thread overview]
Message-ID: <1455638631-3326518-2-git-send-email-arnd@arndb.de> (raw)
In-Reply-To: <1455638631-3326518-1-git-send-email-arnd@arndb.de>
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")
---
arch/arm/kernel/vmlinux.lds.S | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 2d7085ae1c2f..bb12933aee22 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -322,12 +322,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
--
2.7.0
next prev parent reply other threads:[~2016-02-16 16:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 16:03 [PATCH 1/2] ARM: mm: DEBUG_RODATA makes no sense with XIP_KERNEL Arnd Bergmann
2016-02-16 16:03 ` Arnd Bergmann [this message]
2016-02-16 16:12 ` [PATCH 2/2] ARM: mm: hide __start_rodata_section_aligned for non-debug builds Ard Biesheuvel
2016-02-16 16:34 ` Arnd Bergmann
2016-02-16 16:36 ` Ard Biesheuvel
2016-02-16 16:05 ` [PATCH 1/2] ARM: mm: DEBUG_RODATA makes no sense with XIP_KERNEL Ard Biesheuvel
2016-02-16 18:41 ` Kees Cook
2016-02-16 20:31 ` Kees Cook
2016-02-16 23:12 ` Kees Cook
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1455638631-3326518-2-git-send-email-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox