public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Ben Dooks <ben-linux@fluff.org>
Cc: linux-kernel@vger.kernel.org, patch-out@fluff.rog
Subject: Re: [PATCH] scripts - use $OBJDUMP to get correct objdump (cross compile)
Date: Tue, 20 Sep 2005 18:28:49 +1000	[thread overview]
Message-ID: <12002.1127204929@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Mon, 19 Sep 2005 22:06:45 +0100." <20050919210645.GA20669@home.fluff.org>

On Mon, 19 Sep 2005 22:06:45 +0100, 
Ben Dooks <ben-linux@fluff.org> wrote:
>The scripts for `make buildcheck` are executing
>objdump straight, which is wrong if the system
>is using `make CROSS_COMPILE=....`. 
>
>Change the scripts to use $OBJDUMP passed from
>the Makefile's environment, so that the correct
>objdump is used, and the symbols are printed
>correctly

Those scripts are meant to work even when they are invoked by hand,
without OBJDUMP being defined in the environment.  This is the correct
fix.

Signed-off-by: Keith Owens <kaos@ocs.com.au>

Index: linux/scripts/namespace.pl
===================================================================
--- linux.orig/scripts/namespace.pl	2005-08-29 09:41:01.000000000 +1000
+++ linux/scripts/namespace.pl	2005-09-20 18:25:12.124090186 +1000
@@ -67,11 +67,17 @@ use strict;
 use File::Find;
 
 my $nm = "/usr/bin/nm -p";
-my $objdump = "/usr/bin/objdump -s -j .comment";
 my $srctree = "";
 my $objtree = "";
 $srctree = "$ENV{'srctree'}/" if (exists($ENV{'srctree'}));
 $objtree = "$ENV{'objtree'}/" if (exists($ENV{'objtree'}));
+my $objdump;
+if (exists($ENV{'OBJDUMP'})) {
+	$objdump = $ENV{'OBJDUMP'};
+} else {
+	$objdump = 'objdump';
+}
+$objdump .= ' -s -j .comment';
 
 if ($#ARGV != -1) {
 	print STDERR "usage: $0 takes no parameters\n";
Index: linux/scripts/reference_discarded.pl
===================================================================
--- linux.orig/scripts/reference_discarded.pl	2005-09-20 16:36:32.095627904 +1000
+++ linux/scripts/reference_discarded.pl	2005-09-20 18:22:00.117517858 +1000
@@ -14,11 +14,17 @@ my $object;
 my $line;
 my $ignore;
 my $errorcount;
+my $objdump;
+if (exists($ENV{'OBJDUMP'})) {
+	$objdump = $ENV{'OBJDUMP'};
+} else {
+	$objdump = 'objdump';
+}
 
 $| = 1;
 
 # printf("Finding objects, ");
-open(OBJDUMP_LIST, "find . -name '*.o' | xargs objdump -h |") || die "getting objdump list failed";
+open(OBJDUMP_LIST, "find . -name '*.o' | xargs $objdump -h |") || die "getting objdump list failed";
 while (defined($line = <OBJDUMP_LIST>)) {
 	chomp($line);
 	if ($line =~ /:\s+file format/) {
@@ -74,7 +80,7 @@ foreach $object (keys(%object)) {
 $errorcount = 0;
 foreach $object (keys(%object)) {
 	my $from;
-	open(OBJDUMP, "objdump -r $object|") || die "cannot objdump -r $object";
+	open(OBJDUMP, "$objdump -r $object|") || die "cannot objdump -r $object";
 	while (defined($line = <OBJDUMP>)) {
 		chomp($line);
 		if ($line =~ /RELOCATION RECORDS FOR /) {
Index: linux/scripts/reference_init.pl
===================================================================
--- linux.orig/scripts/reference_init.pl	2005-09-20 16:36:32.095627904 +1000
+++ linux/scripts/reference_init.pl	2005-09-20 18:24:14.060854489 +1000
@@ -22,11 +22,17 @@ my %object;
 my $object;
 my $line;
 my $ignore;
+my $objdump;
+if (exists($ENV{'OBJDUMP'})) {
+	$objdump = $ENV{'OBJDUMP'};
+} else {
+	$objdump = 'objdump';
+}
 
 $| = 1;
 
 printf("Finding objects, ");
-open(OBJDUMP_LIST, "find . -name '*.o' | xargs objdump -h |") || die "getting objdump list failed";
+open(OBJDUMP_LIST, "find . -name '*.o' | xargs $objdump -h |") || die "getting objdump list failed";
 while (defined($line = <OBJDUMP_LIST>)) {
 	chomp($line);
 	if ($line =~ /:\s+file format/) {
@@ -81,7 +87,7 @@ printf("ignoring %d conglomerate(s)\n", 
 printf("Scanning objects\n");
 foreach $object (sort(keys(%object))) {
 	my $from;
-	open(OBJDUMP, "objdump -r $object|") || die "cannot objdump -r $object";
+	open(OBJDUMP, "$objdump -r $object|") || die "cannot objdump -r $object";
 	while (defined($line = <OBJDUMP>)) {
 		chomp($line);
 		if ($line =~ /RELOCATION RECORDS FOR /) {


  reply	other threads:[~2005-09-20  8:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-19 21:06 [PATCH] scripts - use $OBJDUMP to get correct objdump (cross compile) Ben Dooks
2005-09-20  8:28 ` Keith Owens [this message]
2005-09-20 14:39   ` Ben Dooks
     [not found] <4OB3R-5gu-13@gated-at.bofh.it>
     [not found] ` <4OLPC-3NQ-19@gated-at.bofh.it>
2005-09-20 16:55   ` Bodo Eggert
2005-09-20 18:43     ` Valdis.Kletnieks
2005-09-20 19:03       ` Bodo Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12002.1127204929@kao2.melbourne.sgi.com \
    --to=kaos@ocs.com.au \
    --cc=ben-linux@fluff.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patch-out@fluff.rog \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox