From patchwork Fri Aug 9 19:45:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 2842107 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7CEA0BF546 for ; Fri, 9 Aug 2013 19:45:37 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8E564202AC for ; Fri, 9 Aug 2013 19:45:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D7F320270 for ; Fri, 9 Aug 2013 19:45:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030841Ab3HITpe (ORCPT ); Fri, 9 Aug 2013 15:45:34 -0400 Received: from mga09.intel.com ([134.134.136.24]:60444 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030857Ab3HITpe (ORCPT ); Fri, 9 Aug 2013 15:45:34 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 09 Aug 2013 12:42:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.89,848,1367996400"; d="scan'208";a="384601962" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.78]) by orsmga002.jf.intel.com with ESMTP; 09 Aug 2013 12:45:29 -0700 Received: by tassilo.localdomain (Postfix, from userid 1000) id B89C5300F9A; Fri, 9 Aug 2013 12:45:29 -0700 (PDT) From: Andi Kleen To: akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Andi Kleen Subject: [PATCH] Handle non ABS crc symbols Date: Fri, 9 Aug 2013 12:45:24 -0700 Message-Id: <1376077524-27573-1-git-send-email-andi@firstfloor.org> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Andi Kleen For some reason I managed to trick gcc into create CRC symbols that are not absolute anymore, but weak. Make modpost handle this case. Andrew, this should fix the bizarre warning. Seems like a toolchain bug to me. Signed-off-by: Andi Kleen --- scripts/mod/modpost.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 6216434..b3dd735 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -599,18 +599,17 @@ static void handle_modversions(struct module *mod, struct elf_info *info, else export = export_from_sec(info, get_secindex(info, sym)); + /* CRC'd symbol */ + if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { + crc = (unsigned int) sym->st_value; + sym_update_crc(symname + strlen(CRC_PFX), mod, crc, + export); + } + switch (sym->st_shndx) { case SHN_COMMON: warn("\"%s\" [%s] is COMMON symbol\n", symname, mod->name); break; - case SHN_ABS: - /* CRC'd symbol */ - if (strncmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) { - crc = (unsigned int) sym->st_value; - sym_update_crc(symname + strlen(CRC_PFX), mod, crc, - export); - } - break; case SHN_UNDEF: /* undefined symbol */ if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL &&