[2.4.17] net/network.o(.text.lock+0x1a88): undefined reference to `local symbols...
Hi,
I read though the archives, and saw another problem with network.o and gcc 3.x, however I didnt see anything about this yet.
I'm using gcc 2.95.4 and binutils 2.11.92.0.12.3, both from debian/unstable.
Let me know if you need any more information.
make[1]: Leaving directory `/usr/src/linux/arch/i386/lib'
ld -m elf_i386 -T /usr/src/linux/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \
--start-group \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
drivers/acpi/acpi.o drivers/char/char.o drivers/block/block.o drivers/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/char/agp/agp.o drivers/char/drm/drm.o drivers/ide/idedriver.o drivers/cdrom/driver.o drivers/pci/driver.o drivers/pnp/pnp.o drivers/video/video.o \
net/network.o \
/usr/src/linux/arch/i386/lib/lib.a /usr/src/linux/lib/lib.a /usr/src/linux/arch/i386/lib/lib.a \
--end-group \
-o vmlinuxnet/network.o(.text.lock+0x1a88): undefined reference to `local symbols in discarded section .text.exit'
make: *** [vmlinux] Error 1
PS. Please CC me any replies.
Thanks,
Norbert
Quoted 1 line · On Sat, 22 Dec 2001 22:22:13 -0500, [email protected] (Norbert Veber) wrote:
net/network.o(.text.lock+0x1a88): undefined reference to `local symbols in discarded section .text.exit'
Got bored, wrote some Perl (Oh hang on, I've used that before).
net/network.o is not much help, it is a conglomerate object. I need the individual object that is failing. cd linux and run reference_discarded.pl below.
Any other patches applied?
#!/usr/bin/perl -w
#
# reference_discarded.pl (C) Keith Owens 2001 <[email protected]> # # 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");
Quoted 5 lines · Keith Owens
Got bored, wrote some Perl (Oh hang on, I've used that before).
net/network.ois not much help, it is a conglomerate object. I need the individual object that is failing. cd linux and run reference_discarded.pl below.
nveber@pyre[9526:/usr/src/linux]$ ~/reference_discarded.pl Finding objects, 790 objects, ignoring 132 module(s) Finding conglomerates, ignoring 57 conglomerate(s) Scanning objects Error: ./net/ipv4/netfilter/ip_nat_snmp_basic.o .text.lock refers to 0000003c R_386_PC32 .text.exit Done
Quoted 2 lines
Any other patches applied?
Nope.
Thanks,
Norbert