[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/287] New: "multiple definition" symbol error on some systems, no

From: kpfleming at linuxfromscratch dot org
Subject: [Bug ld/287] New: "multiple definition" symbol error on some systems, not others
Date: 25 Jul 2004 03:24:43 -0000

A few days ago I posted a message about a problem some of our LFS developers are
having building UML kernels. H.J. Lu asked that I repost when I could supply a
small testcase, so I'm doing that.

The linked testcase tarball, when unpacked and "make" run, will demonstrate the
problem we are having. Note that the make run will always fail, because the link
instructions are incomplete; what I'm concerned about here is an additional
error that occurs on some systems and not others.

The error that occurs on _some_ systems only involves ld reporting that the
"strcpy" symbol has been multiply-defined, in unmap_fin.o (which got if from
glibc) and in strcpy.o (where it was manually defined). What's unusual is that
we cannot find any reliable means to identify which systems will have this
problem and which ones won't.

The error messages generated on the failing systems look like this:

cc -Wl,-T,uml.lds.s -o main main.o strcpy.o
strcpy.o(.text+0x0): In function `strcpy':
: multiple definition of `strcpy'
unmap_fin.o(.text+0x1b950):../sysdeps/generic/strcpy.c:31: first defined here
/usr/bin/ld: Warning: size of symbol `strcpy' changed from 48 in unmap_fin.o to
5 in strcpy.o 

In the most degenerate case, we have a user with two systems both running Fedora
Core 2 with identical packages (no updates have been applied, these are installs
straight off the FC2 install discs). On one system the link fails, on the other
it succeeds. The only difference we know of between the two systems is that one
is an AMD K6-3 processor (which succeeds) and the other is an Intel Pentium 2
(which fails).

I also have test reports from a variety of other systems, involving binutils
versions 2.14, 2.15,* and*. These reports also cover
multiple gcc versions and multiple glibc versions. If you are interested, the
reports are in this thread:


We have not run across this problem building anything other than UML, so it
could very well be a problem in the UML Makefile and/or linker scripts. We
originally were concerned that our toolchain builds were somehow at fault, but
we now have test reports of failure on FC2, Gentoo, and ArchLinux.

           Summary: "multiple definition" symbol error on some systems, not
           Product: binutils
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: kpfleming at linuxfromscratch dot org
                CC: bug-binutils at gnu dot org,jim at jg555 dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]