From patchwork Sat Feb 8 16:01:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 3610441 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0FB969F344 for ; Sat, 8 Feb 2014 16:02:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46EC520163 for ; Sat, 8 Feb 2014 16:02:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 110C820115 for ; Sat, 8 Feb 2014 16:02:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751462AbaBHQBp (ORCPT ); Sat, 8 Feb 2014 11:01:45 -0500 Received: from mga01.intel.com ([192.55.52.88]:1081 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424AbaBHQBo (ORCPT ); Sat, 8 Feb 2014 11:01:44 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 08 Feb 2014 08:01:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.95,806,1384329600"; d="scan'208";a="471871657" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.86]) by fmsmga001.fm.intel.com with ESMTP; 08 Feb 2014 08:01:43 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id A30DC3011FA; Sat, 8 Feb 2014 08:01:43 -0800 (PST) Date: Sat, 8 Feb 2014 08:01:43 -0800 From: Andi Kleen To: Markus Trippelsdorf Cc: mmarek@suse.cz, linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Subject: Re: [PATCH 5/6] kbuild: Use single pass kallsyms Message-ID: <20140208160143.GF12219@tassilo.jf.intel.com> References: <1391845840-28514-1-git-send-email-ak@linux.intel.com> <1391845840-28514-5-git-send-email-ak@linux.intel.com> <20140208091920.GA400@x4> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140208091920.GA400@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 > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index 4c5435f420a6..06469556c580 100644 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -213,7 +213,7 @@ if [ -n "${CONFIG_KALLSYMS}" ] ; then > > info PATCHFILE vmlinux > OFF=$(${OBJDUMP} --section-headers vmlinux | > - gawk -f ./source/scripts/elf_file_offset \ > + gawk -f ./scripts/elf_file_offset \ I think that would break with object dirs (which was what I used), because the scripts there only has some executables. Really need ${srcdir}, but it would need to be exported first. This should work: -Andi diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 4c5435f..5f0ae1a 100644 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -212,8 +212,10 @@ if [ -n "${CONFIG_KALLSYMS}" ] ; then ${OBJCOPY} -O binary .tmp_kallsyms2.o .tmp_kallsyms2.bin info PATCHFILE vmlinux + EF=scripts/elf_file_offset + if [ ! -r $EF ] ; then EF=source/$EF ; fi OFF=$(${OBJDUMP} --section-headers vmlinux | - gawk -f ./source/scripts/elf_file_offset \ + gawk -f $EF \ -v section=.kallsyms -v filesize=$(stat -c%s .tmp_kallsyms2.bin) ) if [ -z "$OFF" ] ; then echo "Cannot find .kallsyms section in vmlinux binary"