mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] scripts - use $OBJDUMP to get correct objdump (cross compile)
@ 2005-09-19 21:06 Ben Dooks
  2005-09-20  8:28 ` Keith Owens
  0 siblings, 1 reply; 6+ messages in thread
From: Ben Dooks @ 2005-09-19 21:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: patch-out

[-- Attachment #1: Type: text/plain, Size: 2347 bytes --]

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

Signed-off-by: Ben Dooks <ben-linux@fluff.org>

diff -urN -X ../dontdiff linux-2.6.13-simtec1/scripts/reference_discarded.pl linux-2.6.13-simtec2/scripts/reference_discarded.pl
--- linux-2.6.13-simtec1/scripts/reference_discarded.pl	2005-09-06 12:28:18.000000000 +0100
+++ linux-2.6.13-simtec2/scripts/reference_discarded.pl	2005-09-19 22:02:07.000000000 +0100
@@ -18,7 +18,7 @@
 $| = 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 +74,7 @@
 $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 /) {
diff -urN -X ../dontdiff linux-2.6.13-simtec1/scripts/reference_init.pl linux-2.6.13-simtec2/scripts/reference_init.pl
--- linux-2.6.13-simtec1/scripts/reference_init.pl	2005-09-06 12:28:18.000000000 +0100
+++ linux-2.6.13-simtec2/scripts/reference_init.pl	2005-09-19 22:00:52.000000000 +0100
@@ -26,7 +26,7 @@
 $| = 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 +81,7 @@
 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 /) {

[-- Attachment #2: scripts-buildcheck-pass-objdump.patch --]
[-- Type: text/plain, Size: 2015 bytes --]

diff -urN -X ../dontdiff linux-2.6.13-simtec1/scripts/reference_discarded.pl linux-2.6.13-simtec2/scripts/reference_discarded.pl
--- linux-2.6.13-simtec1/scripts/reference_discarded.pl	2005-09-06 12:28:18.000000000 +0100
+++ linux-2.6.13-simtec2/scripts/reference_discarded.pl	2005-09-19 22:02:07.000000000 +0100
@@ -18,7 +18,7 @@
 $| = 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 +74,7 @@
 $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 /) {
diff -urN -X ../dontdiff linux-2.6.13-simtec1/scripts/reference_init.pl linux-2.6.13-simtec2/scripts/reference_init.pl
--- linux-2.6.13-simtec1/scripts/reference_init.pl	2005-09-06 12:28:18.000000000 +0100
+++ linux-2.6.13-simtec2/scripts/reference_init.pl	2005-09-19 22:00:52.000000000 +0100
@@ -26,7 +26,7 @@
 $| = 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 +81,7 @@
 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 /) {

^ permalink raw reply	[flat|nested] 6+ messages in thread
[parent not found: <4OB3R-5gu-13@gated-at.bofh.it>]

end of thread, other threads:[~2005-09-20 19:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-19 21:06 [PATCH] scripts - use $OBJDUMP to get correct objdump (cross compile) Ben Dooks
2005-09-20  8:28 ` Keith Owens
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome