This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/16932] Compilation error for sh-coff-gcc little endian target
- From: "wilson at specifixinc dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2004 03:29:46 -0000
- Subject: [Bug target/16932] Compilation error for sh-coff-gcc little endian target
- References: <20040809112414.16932.nitins2@kpitcummins.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From wilson at specifixinc dot com 2004-08-20 03:29 -------
Subject: Re: Compilation error for sh-coff-gcc little endian
target
nitins2 at kpitcummins dot com wrote:
> Can anybody suggest why linker gives undefined references for symbols
> from "_ashiftrt.o" though
> symbols are already present in "_ashiftrt.o" ?
Check the link order of libraries. A function is brought in from a
library only if there is an undefined reference to it at the point where
the library is linked in. If you have cross references between libgcc
and libc, then you may have to specify them multiple times to resolve
all undefined functions, e.g.
-lc -lgcc -lc -lgcc
There are linker options to simplify this, --start-group --end-group.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16932