]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
cris: Fix section mismatches in architecture startup code
authorGuenter Roeck <linux@roeck-us.net>
Tue, 10 Nov 2015 22:04:36 +0000 (14:04 -0800)
committerJesper Nilsson <jespern@axis.com>
Tue, 15 Dec 2015 13:03:19 +0000 (14:03 +0100)
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>
arch/cris/arch-v10/kernel/head.S
arch/cris/arch-v32/kernel/head.S
arch/cris/kernel/vmlinux.lds.S

index a4877a4217560b5074ca1421377913286a646255..a74aa233b84ede4c0b50a740a3558b821ec65e26 100644 (file)
@@ -5,6 +5,8 @@
  *
  */
 
+#include <linux/init.h>
+
 #define ASSEMBLER_MACROS_ONLY
 /* The IO_* macros use the ## token concatenation operator, so
    -traditional must not be used when assembling this file.  */
@@ -25,7 +27,7 @@
        .globl  romfs_in_flash
        .globl  swapper_pg_dir
 
-       .text
+       __HEAD
 
        ;; This is the entry point of the kernel. We are in supervisor mode.
        ;; 0x00000000 if Flash, 0x40004000 if DRAM
@@ -159,7 +161,7 @@ _inflash0:
 
        ;; Put this in a suitable section where we can reclaim storage
        ;; after init.
-       .section ".init.text", "ax"
+       __INIT
 _inflash:
 #ifdef CONFIG_ETRAX_ETHERNET
        ;; Start MII clock to make sure it is running when tranceiver is reset
index ea6366800df7bb300504ba36f48b77d5b3792828..5ce83eb54f584dd173ea00355f25efbf0918dbf0 100644 (file)
@@ -4,6 +4,8 @@
  * Copyright (C) 2003, Axis Communications AB
  */
 
+#include <linux/init.h>
+
 #define ASSEMBLER_MACROS_ONLY
 
 /*
@@ -36,7 +38,7 @@
        .global nand_boot
        .global swapper_pg_dir
 
-       .text
+       __HEAD
 tstart:
        ;; This is the entry point of the kernel. The CPU is currently in
        ;; supervisor mode.
@@ -177,7 +179,7 @@ _inflash0:
 
        ;; Put the following in a section so that storage for it can be
        ;; reclaimed after init is finished.
-       .section ".init.text", "ax"
+       __INIT
 
 _inflash:
 
index a68b983dcea1bd413630c03e375f20a21baa5db8..7552c255750659c2efd4e3d525dcce6267f3cd94 100644 (file)
@@ -40,6 +40,7 @@ SECTIONS
        _stext = .;
        __stext = .;
        .text : {
+               HEAD_TEXT
                TEXT_TEXT
                SCHED_TEXT
                LOCK_TEXT