aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-11-10 17:04:36 -0500
committerJesper Nilsson <jespern@axis.com>2015-12-15 08:03:19 -0500
commitf9f3f864b5e8c09d7837d8980edba4ad52969819 (patch)
treea26db2d1e49fb000a89a82d2a5a3930a7e0bd5b7
parent56edefc98a1c3c8124823ed45260c1c912f81bb3 (diff)
cris: Fix section mismatches in architecture startup code
Section mismatches can now result in build failures. As result, cris:allnoconfig fails to build as follows. WARNING: modpost: Found 7 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y' FATAL: modpost: Section mismatches detected. Set CONFIG_SECTION_MISMATCH_WARN_ONLY=y to allow them. Part of the problem is that references from .text to .init.text are not permitted, and such references are used in cris startup code. Since references from .head.text to .init.text are permitted, move cris startup code to a new section .head.text. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Jesper Nilsson <jesper.nilsson@axis.com>
-rw-r--r--arch/cris/arch-v10/kernel/head.S6
-rw-r--r--arch/cris/arch-v32/kernel/head.S6
-rw-r--r--arch/cris/kernel/vmlinux.lds.S1
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/cris/arch-v10/kernel/head.S b/arch/cris/arch-v10/kernel/head.S
index a4877a421756..a74aa233b84e 100644
--- a/arch/cris/arch-v10/kernel/head.S
+++ b/arch/cris/arch-v10/kernel/head.S
@@ -5,6 +5,8 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/init.h>
9
8#define ASSEMBLER_MACROS_ONLY 10#define ASSEMBLER_MACROS_ONLY
9/* The IO_* macros use the ## token concatenation operator, so 11/* The IO_* macros use the ## token concatenation operator, so
10 -traditional must not be used when assembling this file. */ 12 -traditional must not be used when assembling this file. */
@@ -25,7 +27,7 @@
25 .globl romfs_in_flash 27 .globl romfs_in_flash
26 .globl swapper_pg_dir 28 .globl swapper_pg_dir
27 29
28 .text 30 __HEAD
29 31
30 ;; This is the entry point of the kernel. We are in supervisor mode. 32 ;; This is the entry point of the kernel. We are in supervisor mode.
31 ;; 0x00000000 if Flash, 0x40004000 if DRAM 33 ;; 0x00000000 if Flash, 0x40004000 if DRAM
@@ -159,7 +161,7 @@ _inflash0:
159 161
160 ;; Put this in a suitable section where we can reclaim storage 162 ;; Put this in a suitable section where we can reclaim storage
161 ;; after init. 163 ;; after init.
162 .section ".init.text", "ax" 164 __INIT
163_inflash: 165_inflash:
164#ifdef CONFIG_ETRAX_ETHERNET 166#ifdef CONFIG_ETRAX_ETHERNET
165 ;; Start MII clock to make sure it is running when tranceiver is reset 167 ;; Start MII clock to make sure it is running when tranceiver is reset
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S
index ea6366800df7..5ce83eb54f58 100644
--- a/arch/cris/arch-v32/kernel/head.S
+++ b/arch/cris/arch-v32/kernel/head.S
@@ -4,6 +4,8 @@
4 * Copyright (C) 2003, Axis Communications AB 4 * Copyright (C) 2003, Axis Communications AB
5 */ 5 */
6 6
7#include <linux/init.h>
8
7#define ASSEMBLER_MACROS_ONLY 9#define ASSEMBLER_MACROS_ONLY
8 10
9/* 11/*
@@ -36,7 +38,7 @@
36 .global nand_boot 38 .global nand_boot
37 .global swapper_pg_dir 39 .global swapper_pg_dir
38 40
39 .text 41 __HEAD
40tstart: 42tstart:
41 ;; This is the entry point of the kernel. The CPU is currently in 43 ;; This is the entry point of the kernel. The CPU is currently in
42 ;; supervisor mode. 44 ;; supervisor mode.
@@ -177,7 +179,7 @@ _inflash0:
177 179
178 ;; Put the following in a section so that storage for it can be 180 ;; Put the following in a section so that storage for it can be
179 ;; reclaimed after init is finished. 181 ;; reclaimed after init is finished.
180 .section ".init.text", "ax" 182 __INIT
181 183
182_inflash: 184_inflash:
183 185
diff --git a/arch/cris/kernel/vmlinux.lds.S b/arch/cris/kernel/vmlinux.lds.S
index a68b983dcea1..7552c2557506 100644
--- a/arch/cris/kernel/vmlinux.lds.S
+++ b/arch/cris/kernel/vmlinux.lds.S
@@ -40,6 +40,7 @@ SECTIONS
40 _stext = .; 40 _stext = .;
41 __stext = .; 41 __stext = .;
42 .text : { 42 .text : {
43 HEAD_TEXT
43 TEXT_TEXT 44 TEXT_TEXT
44 SCHED_TEXT 45 SCHED_TEXT
45 LOCK_TEXT 46 LOCK_TEXT