All of lore.kernel.org
 help / color / mirror / Atom feed
* (2.5.5-dj2) still getting .text.exit linker errors
@ 2002-02-27 22:01 James Curbo
  2002-02-27 22:41 ` Dave Jones
  2002-02-27 22:52 ` Keith Owens
  0 siblings, 2 replies; 4+ messages in thread
From: James Curbo @ 2002-02-27 22:01 UTC (permalink / raw)
  To: linux-kernel

[note: I am not subscribed, please cc: me in replies]

When compiling 2.5.5-dj2, I am still getting a .text.exit linker error:

drivers/net/net.o(.data+0x1274): undefined reference to `local symbols 
in discarded section .text.exit'

I am using Debian unstable, binutils 2.11.93.0.2:

ii  binutils       2.11.93.0.2-2

I can get it to link if I follow the directions that the Debian
maintainer has been giving out (deleting the .text.exit line from
vmlinux.lds) but that isn't the right solution, and I don't have the
abilities to actually fix it. My ver_linux output is appeneded at the
end. Thanks in advance.

James

Linux carthage 2.5.5-dj2 #1 Wed Feb 27 01:08:00 CST 2002 i686 unknown

Gnu C                  2.95.4
Gnu make               3.79.1
util-linux             2.11n
mount                  2.11n
modutils               2.4.13
e2fsprogs              1.26
Linux C Library        2.2.5
Dynamic linker (ldd)   2.2.5
Procps                 2.0.7
Net-tools              1.60
Console-tools          0.2.3
Sh-utils               2.0.11
Modules Loaded         emu10k1 ac97_codec sound

-- 
James Curbo <jcurbo@acm.org> <jc108788@rc.hsu.edu>
Undergraduate Computer Science, Henderson State University
PGP Keys at <http://reddie.henderson.edu/~curboj/>
Public Keys: PGP - 1024/0x76E2061B GNUPG - 1024D/0x3EEA7288

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (2.5.5-dj2) still getting .text.exit linker errors
  2002-02-27 22:01 (2.5.5-dj2) still getting .text.exit linker errors James Curbo
@ 2002-02-27 22:41 ` Dave Jones
  2002-02-28  0:41   ` James Curbo
  2002-02-27 22:52 ` Keith Owens
  1 sibling, 1 reply; 4+ messages in thread
From: Dave Jones @ 2002-02-27 22:41 UTC (permalink / raw)
  To: James Curbo; +Cc: linux-kernel

On Wed, Feb 27, 2002 at 04:01:38PM -0600, James Curbo wrote:
 > drivers/net/net.o(.data+0x1274): undefined reference to `local symbols 
 > in discarded section .text.exit'

 Can you grab http://kernelnewbies.org/scripts/reference_discarded.pl
 and post the output ?

-- 
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (2.5.5-dj2) still getting .text.exit linker errors
  2002-02-27 22:01 (2.5.5-dj2) still getting .text.exit linker errors James Curbo
  2002-02-27 22:41 ` Dave Jones
@ 2002-02-27 22:52 ` Keith Owens
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Owens @ 2002-02-27 22:52 UTC (permalink / raw)
  To: James Curbo; +Cc: linux-kernel

On Wed, 27 Feb 2002 16:01:38 -0600, 
James Curbo <jcurbo@acm.org> wrote:
>[note: I am not subscribed, please cc: me in replies]
>
>When compiling 2.5.5-dj2, I am still getting a .text.exit linker error:
>
>drivers/net/net.o(.data+0x1274): undefined reference to `local symbols 
>in discarded section .text.exit'

Run this script to identify the offending object in net.o then contact
the object maintainer.


#!/usr/bin/perl -w
#
# reference_discarded.pl (C) Keith Owens 2001 <kaos@ocs.com.au>
#
# List dangling references to vmlinux discarded sections.

use strict;
die($0 . " takes no arguments\n") if($#ARGV >= 0);

my %object;
my $object;
my $line;
my $ignore;

$| = 1;

printf("Finding objects, ");
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/) {
		($object = $line) =~ s/:.*//;
		$object{$object}->{'module'} = 0;
		$object{$object}->{'size'} = 0;
		$object{$object}->{'off'} = 0;
	}
	if ($line =~ /^\s*\d+\s+\.modinfo\s+/) {
		$object{$object}->{'module'} = 1;
	}
	if ($line =~ /^\s*\d+\s+\.comment\s+/) {
		($object{$object}->{'size'}, $object{$object}->{'off'}) = (split(' ', $line))[2,5]; 
	}
}
close(OBJDUMP_LIST);
printf("%d objects, ", scalar keys(%object));
$ignore = 0;
foreach $object (keys(%object)) {
	if ($object{$object}->{'module'}) {
		++$ignore;
		delete($object{$object});
	}
}
printf("ignoring %d module(s)\n", $ignore);

# Ignore conglomerate objects, they have been built from multiple objects and we
# only care about the individual objects.  If an object has more than one GCC:
# string in the comment section then it is conglomerate.  This does not filter
# out conglomerates that consist of exactly one object, can't be helped.

printf("Finding conglomerates, ");
$ignore = 0;
foreach $object (keys(%object)) {
	if (exists($object{$object}->{'off'})) {
		my ($off, $size, $comment, $l);
		$off = hex($object{$object}->{'off'});
		$size = hex($object{$object}->{'size'});
		open(OBJECT, "<$object") || die "cannot read $object";
		seek(OBJECT, $off, 0) || die "seek to $off in $object failed";
		$l = read(OBJECT, $comment, $size);
		die "read $size bytes from $object .comment failed" if ($l != $size);
		close(OBJECT);
		if ($comment =~ /GCC\:.*GCC\:/m) {
			++$ignore;
			delete($object{$object});
		}
	}
}
printf("ignoring %d conglomerate(s)\n", $ignore);

printf("Scanning objects\n");
foreach $object (keys(%object)) {
	my $from;
	open(OBJDUMP, "objdump -r $object|") || die "cannot objdump -r $object";
	while (defined($line = <OBJDUMP>)) {
		chomp($line);
		if ($line =~ /RELOCATION RECORDS FOR /) {
			($from = $line) =~ s/.*\[([^]]*).*/$1/;
		}
		if (($line =~ /\.text\.exit$/ ||
		     $line =~ /\.data\.exit$/ ||
		     $line =~ /\.exitcall\.exit$/) &&
		    ($from !~ /\.text\.exit$/ &&
		     $from !~ /\.data\.exit$/ &&
		     $from !~ /\.exitcall\.exit$/)) {
			printf("Error: %s %s refers to %s\n", $object, $from, $line);
		}
	}
	close(OBJDUMP);
}
printf("Done\n");


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: (2.5.5-dj2) still getting .text.exit linker errors
  2002-02-27 22:41 ` Dave Jones
@ 2002-02-28  0:41   ` James Curbo
  0 siblings, 0 replies; 4+ messages in thread
From: James Curbo @ 2002-02-28  0:41 UTC (permalink / raw)
  To: Dave Jones, linux-kernel

OK, here it is:

Finding objects, 513 objects, ignoring 0 module(s)
Finding conglomerates, ignoring 53 conglomerate(s)
Scanning objects
Error: ./drivers/net/de2104x.o .data refers to 00000074 R_386_32
.text.exit
Done

On Feb 27, Dave Jones wrote:
> On Wed, Feb 27, 2002 at 04:01:38PM -0600, James Curbo wrote:
>  > drivers/net/net.o(.data+0x1274): undefined reference to `local symbols 
>  > in discarded section .text.exit'
> 
>  Can you grab http://kernelnewbies.org/scripts/reference_discarded.pl
>  and post the output ?
> 
> -- 
> | Dave Jones.        http://www.codemonkey.org.uk
> | SuSE Labs

-- 
James Curbo <jcurbo@acm.org> <jc108788@rc.hsu.edu>
Undergraduate Computer Science, Henderson State University
PGP Keys at <http://reddie.henderson.edu/~curboj/>
Public Keys: PGP - 1024/0x76E2061B GNUPG - 1024D/0x3EEA7288

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-02-28  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-02-27 22:01 (2.5.5-dj2) still getting .text.exit linker errors James Curbo
2002-02-27 22:41 ` Dave Jones
2002-02-28  0:41   ` James Curbo
2002-02-27 22:52 ` Keith Owens

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.