Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3BF78F05.4020003@enea.se>
Date: Sun, 18 Nov 2001 11:35:49 +0100
From: Mohammad Saleem <mosa@enea.se>
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1
X-Accept-Language: en-us
MIME-Version: 1.0
To: crossgcc@sources.redhat.com, cygwin@cygwin.com
Subject: linking application with a library
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi all,

I am using h8300-hitachi-hms-gcc cross-complier for building my application.
I have a lib mylib.a (20 kb) which I want to link with my application.
My application gets 20 kb bigger as soon as I link it with mylib.a 
without any function being called from mylib.a.
It seems to me that I have built mylib.a so that the whole lib is linked 
during linking process even if no one method is being called.
Now my question is which flag should I use to build mylib.a so that only 
those functions are linked which are being called.
If no function is called then linking mylib.a shouldn't affect the size 
of my application.

Thanks for help.

regards
/Mohammad


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

