Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760327AbcLBPgD (ORCPT ); Fri, 2 Dec 2016 10:36:03 -0500 Received: from tartarus.angband.pl ([89.206.35.136]:33388 "EHLO tartarus.angband.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755597AbcLBPgB (ORCPT ); Fri, 2 Dec 2016 10:36:01 -0500 Date: Fri, 2 Dec 2016 16:35:35 +0100 From: Adam Borowski To: Arnd Bergmann Cc: Linus Torvalds , Greg Kroah-Hartman , Linux Kbuild mailing list , Michal Marek , Ben Hutchings , Debian kernel maintainers , "linux-arch@vger.kernel.org" , Ingo Molnar , Nicholas Piggin , Linux Kernel Mailing List , Alan Modra Subject: Re: [RFC, PATCH, v3.9] default exported asm symbols to zero Message-ID: <20161202153535.GB16491@angband.pl> References: <20161129131922.GA31466@angband.pl> <14455987.OWjnZpEEup@wuerfel> <8452191.39CeLIHTBT@wuerfel> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8452191.39CeLIHTBT@wuerfel> X-Junkbait: aaron@angband.pl, zzyx@angband.pl User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kilobyte@angband.pl X-SA-Exim-Scanned: No (on tartarus.angband.pl); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 39 On Fri, Dec 02, 2016 at 01:40:27PM +0100, Arnd Bergmann wrote: > With binutils-2.16 and before, a weak missing symbol was kept during the > final link, and a missing CRC for an export would lead to that CRC > being treated as zero implicitly. With binutils-2.17, the crc > symbol gets dropped, and any module trying to use it will fail to > load. > > This sets the weak CRC symbol to zero explicitly, making it defined > in vmlinux, which in turn lets us load the modules referring to > that CRC. > > The comment above the __CRC_SYMBOL macro suggests that this was > always the intention, although it also seems that all symbols > defined in C have a correct CRC these days, and only the exports > that are now done in assembly need this. > > Signed-off-by: Arnd Bergmann > --- Looks good, works for me, and, unlike faaae2a5, doesn't produce a nasty user-scaring warning in normal operation. > diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h > index 63554e9..59a3b2f 100644 > --- a/include/asm-generic/export.h > +++ b/include/asm-generic/export.h > @@ -54,6 +54,7 @@ KSYM(__kstrtab_\name): > KSYM(__kcrctab_\name): > __put KSYM(__crc_\name) > .weak KSYM(__crc_\name) > + .set KSYM(__crc_\name), 0 > .previous > #endif > #endif -- The bill declaring Jesus as the King of Poland fails to specify whether the addition is at the top or end of the list of kings. What should the historians do?