From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15299 invoked by alias); 20 Aug 2004 03:29:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15292 invoked by alias); 20 Aug 2004 03:29:46 -0000 Date: Fri, 20 Aug 2004 03:29:00 -0000 Message-ID: <20040820032946.15291.qmail@sourceware.org> From: "wilson at specifixinc dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040809112414.16932.nitins2@kpitcummins.com> References: <20040809112414.16932.nitins2@kpitcummins.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/16932] Compilation error for sh-coff-gcc little endian target X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg02033.txt.bz2 List-Id: ------- 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