From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22543 invoked by alias); 27 Sep 2012 14:05:38 -0000 Received: (qmail 22530 invoked by uid 22791); 27 Sep 2012 14:05:36 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KHOP_SPAMHAUS_DROP,KHOP_THREADED,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail108.messagelabs.com (HELO mail108.messagelabs.com) (216.82.250.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Sep 2012 14:05:32 +0000 X-Env-Sender: AFeuerbacher@ALLEGROMICRO.com X-Msg-Ref: server-10.tower-108.messagelabs.com!1348754730!9078114!1 X-StarScan-Received: X-StarScan-Version: 6.6.1.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 8094 invoked from network); 27 Sep 2012 14:05:31 -0000 Received: from unknown (HELO NHCASHUB1.allegro.msad) (63.115.78.77) by server-10.tower-108.messagelabs.com with AES128-SHA encrypted SMTP; 27 Sep 2012 14:05:31 -0000 Received: from NHEXCH2.allegro.msad ([169.254.2.233]) by NHCASHUB1.allegro.msad ([198.151.154.233]) with mapi id 14.01.0289.001; Thu, 27 Sep 2012 10:05:29 -0400 From: "Feuerbacher, Alan" To: Ian Lance Taylor , Dan Hitt CC: "gcc-help@gcc.gnu.org" Subject: RE: is there any way to change the order of name resolution in linking (aside from putting the libraries in the right order?) Date: Thu, 27 Sep 2012 14:05:00 -0000 Message-ID: <680BABF85B31BC4DB6E3E4E33D569F4D0AC12D1B@NHEXCH2.allegro.msad> References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-09/txt/msg00229.txt.bz2 Ian Lance Taylor wrote: > One thing that may work, if you are using the GNU linker or something > reasonably compatible, is > -Wl,--whole-archive,-lMYLIB,-Wl,--no-whole-archive >=20 > That will link in the entire contents of the library, so all the > symbols defined in the library will be available. I'm trying something like that for a related purpose, but for it to work yo= u have to replace the "," after "MYLIB" with a space. Otherwise gcc complai= ns about an invalid option "-Wl". Alan