From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30191 invoked by alias); 14 Jul 2011 17:16:01 -0000 Received: (qmail 30172 invoked by uid 22791); 14 Jul 2011 17:15:59 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jul 2011 17:15:44 +0000 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id p6EHFgI2015478 for ; Thu, 14 Jul 2011 10:15:42 -0700 Received: from iyf40 (iyf40.prod.google.com [10.241.50.104]) by wpaz1.hot.corp.google.com with ESMTP id p6EHEeuN004184 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Thu, 14 Jul 2011 10:15:40 -0700 Received: by iyf40 with SMTP id 40so475846iyf.40 for ; Thu, 14 Jul 2011 10:15:40 -0700 (PDT) Received: by 10.42.130.7 with SMTP id t7mr2582267ics.392.1310663740620; Thu, 14 Jul 2011 10:15:40 -0700 (PDT) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id x11sm287737ibd.7.2011.07.14.10.15.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 14 Jul 2011 10:15:39 -0700 (PDT) From: Ian Lance Taylor To: Aleksandar Simeonov 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> Date: Thu, 14 Jul 2011 22:07:00 -0000 In-Reply-To: <4E1EA2F5.4040509@RT-RK.com> (Aleksandar Simeonov's message of "Thu, 14 Jul 2011 10:04:05 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes 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/msg00158.txt.bz2 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 >>