From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19856 invoked by alias); 15 Jul 2011 10:55:30 -0000 Received: (qmail 19847 invoked by uid 22791); 15 Jul 2011 10:55:29 -0000 X-SWARE-Spam-Status: No, hits=-1.1 required=5.0 tests=AWL,BAYES_00,RDNS_NONE X-Spam-Check-By: sourceware.org Received: from Unknown (HELO mail.rt-rk.com) (147.91.177.140) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 15 Jul 2011 10:54:55 +0000 Message-ID: <4E201C77.6060507@RT-RK.com> Date: Fri, 15 Jul 2011 18:19:00 -0000 From: Aleksandar Simeonov User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Lightning/1.0b2 Thunderbird/3.1.11 ThunderBrowse/3.3.5 MIME-Version: 1.0 To: Ian Lance Taylor CC: binutils , rich@mips.com Subject: Re: Using linker script instead of library in Gold References: <4E1DAC56.5070105@RT-RK.com> <4E1EA2F5.4040509@RT-RK.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-07/txt/msg00165.txt.bz2 Thanks, You were right. Problem was that I used elf32-mips instead of elf32-tradlittlemips as name. I fixed that, and now that part work (still there are some other issues :-)). Aleksandar On 14/07/2011 19:15, Ian Lance Taylor wrote: > Aleksandar Simeonov writes: > >> Yes, but still when I do linking I got error like: >> ../../mips-linux-gnu-ld.gold: Attempt to open /usr/lib/libc.so succeeded >> ../../mips-linux-gnu-ld.gold: warning: skipping incompatible >> /usr/lib/libc.so while searching for c >> ../../mips-linux-gnu-ld.gold: error: cannot find -lc >> >> Maybe I overlooked something? > > It means that the OUTPUT_FORMAT string in your libc.so, > elf32-tradlittlemips, was not recognized or did not match the target > recognized for the .o files. What string are you passing to the > Target_selector constructor? > > Ian > > >> On 13/07/2011 17:46, Ian Lance Taylor wrote: >>> Aleksandar Simeonov writes: >>> >>>> I have one short question today. Situation is as follow: instead of >>>> having lib.so as shared library, on our Linux distribution we have ld >>>> linker script: >>>> /* GNU ld script >>>> Use the shared library, but some functions are only in >>>> the static library, so try that secondarily. */ >>>> OUTPUT_FORMAT(elf32-tradlittlemips) >>>> GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( >>>> /lib/ld.so.1 ) ) >>>> >>>> Is Gold capable of using it (for ld is enough to put -lc in command >>>> line) and if yes, what command option should be used? >>> >>> This is normal on any glibc-based system. gold supports this without >>> requiring any special options. >>> >>> Ian >>> >