Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686AbbKPAuu (ORCPT ); Sun, 15 Nov 2015 19:50:50 -0500 Received: from ozlabs.org ([103.22.144.67]:41747 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751943AbbKPAut (ORCPT ); Sun, 15 Nov 2015 19:50:49 -0500 Message-ID: <1447635046.12577.3.camel@ellerman.id.au> Subject: Re: Section mismatches in arch/powerpc/kernel/head_64.S From: Michael Ellerman To: Laura Abbott , Paul Mackerras , Scott Wood , Tiejun Chen , Benjamin Herrenschmidt Cc: "linuxppc-dev@lists.ozlabs.org" , Linux Kernel Mailing List Date: Mon, 16 Nov 2015 11:50:46 +1100 In-Reply-To: <5645072A.9000103@redhat.com> References: <5645072A.9000103@redhat.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.16.5-1ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2363 Lines: 55 Hi Laura, On Thu, 2015-11-12 at 13:39 -0800, Laura Abbott wrote: > Hi, > There seem to be section mismatches coming from head_64.S > > WARNING: vmlinux.o(.text+0x8994): Section mismatch in reference from the > variable __boot_from_prom to the function .init.text:prom_init() > The function __boot_from_prom() references > the function __init prom_init(). > This is often because __boot_from_prom lacks a __init > annotation or the annotation of prom_init is wrong. > > WARNING: vmlinux.o(.text+0x8c30): Section mismatch in reference from the > variable start_here_multiplatform to the function .init.text:early_setup() > The function start_here_multiplatform() references > the function __init early_setup(). > This is often because start_here_multiplatform lacks a __init > annotation or the annotation of early_setup is wrong. > > WARNING: vmlinux.o(.text+0x8c54): Section mismatch in reference from the > variable start_here_common to the function .init.text:setup_system() > The function start_here_common() references > the function __init setup_system(). > This is often because start_here_common lacks a __init > annotation or the annotation of setup_system is wrong. > > WARNING: vmlinux.o(.text+0x8c68): Section mismatch in reference from the > variable start_here_common to the function .init.text:start_kernel() > The function start_here_common() references > the function __init start_kernel(). > This is often because start_here_common lacks a __init > annotation or the annotation of start_kernel is wrong. These all look correct, ie. they are references from non-init code to init code. I don't think any of them are real bugs, because that is all early boot code anyway which should never run after boot, or if it did that would be a big anyway. I'm not sure how we fix them. Some of that code might be able to be moved out of head_64.S and made __init, but then you just have the same problem again. It looks like x86 calls through a pointer and marks that as __REFDATA, but that's kind of gross just to avoid a section mismatch warning. So I'm not sure what the solution is here. cheers -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/