From patchwork Sat Feb 8 17:46:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 3611081 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 9EA7FBF418 for ; Sat, 8 Feb 2014 17:47:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DF2382016C for ; Sat, 8 Feb 2014 17:47:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 18F1B2012F for ; Sat, 8 Feb 2014 17:47:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751939AbaBHRqt (ORCPT ); Sat, 8 Feb 2014 12:46:49 -0500 Received: from mga11.intel.com ([192.55.52.93]:14312 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751931AbaBHRqs (ORCPT ); Sat, 8 Feb 2014 12:46:48 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 08 Feb 2014 09:46:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,806,1384329600"; d="scan'208";a="478116933" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.86]) by fmsmga002.fm.intel.com with ESMTP; 08 Feb 2014 09:46:45 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id B4D3C30120E; Sat, 8 Feb 2014 09:46:45 -0800 (PST) Date: Sat, 8 Feb 2014 09:46:45 -0800 From: Andi Kleen To: Markus Trippelsdorf Cc: mmarek@suse.cz, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 4/6] kbuild: Support padding in kallsyms tables Message-ID: <20140208174645.GH12219@tassilo.jf.intel.com> References: <1391845840-28514-1-git-send-email-ak@linux.intel.com> <1391845840-28514-4-git-send-email-ak@linux.intel.com> <20140208121241.GA401@x4> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140208121241.GA401@x4> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.4 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 > With attached config I get: > > KSYM .tmp_kallsyms2.o > kallsyms: address pointers padding too short: 24495 missing > OBJCOPY .tmp_kallsyms2.bin > PATCHFILE vmlinux > Not enough padding in vmlinux for new kallsyms, missing 192120 > Makefile:840: recipe for target 'vmlinux' failed Nice test case thanks. This should fix it. --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index e479076..fb6898f 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -197,15 +197,19 @@ static int symbol_valid_tr(struct sym_entry *s) { size_t i; struct text_range *tr; + int valid = 0; for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) { tr = &text_ranges[i]; + if (tr->start && tr->end) + valid++; + if (s->addr >= tr->start && s->addr <= tr->end) return 1; } - return 0; + return valid ? 0 : 1; } static int symbol_valid(struct sym_entry *s)