From: Richard Dawe Newsgroups: comp.os.msdos.djgpp Subject: Re: stripping libraries Date: Tue, 11 Apr 2000 20:14:44 +0100 Organization: Customer of Planet Online Lines: 41 Message-ID: <38F379A4.FB7FFCF2@bigfoot.com> References: <0755aefe DOT 5d9e585f AT usw-ex0101-007 DOT remarq DOT com> NNTP-Posting-Host: modem-106.dextromethorphn.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: newsg3.svr.pol.co.uk 955480754 14791 62.136.90.234 (11 Apr 2000 19:19:14 GMT) NNTP-Posting-Date: 11 Apr 2000 19:19:14 GMT X-Complaints-To: abuse AT theplanet DOT net X-Mailer: Mozilla 4.51 [en] (X11; I; Linux 2.2.14 i586) X-Accept-Language: de,fr To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello. Clemens Valens wrote: [snip] > When I inspect the library file I find all internal function > names etc. that I do not want to be visible. How can I strip all > this? > > I have tried "strip --strip-debug -x" but everything is still > there. When I strip using "-K my_symbol" I can get rid of all > the unwanted stuff, but a program that uses this library doesn't > work anymore. [snip] Why don't you make some of the internal functions static? That way they won't be usable outside their parent C source file, e.g. instead of: int some_function_i_dont_want_to_be_visible (void) { ... } you'd have: static int some_function_i_dont_want_to_be_visible (void) { ... } As I said, this won't work if you want to use this function outside the .c file. The same use of 'static' can be done with variables internal to the library. BTW if you have a program that uses your library's internal functions, then the functions aren't really internal to your library anymore. Hope this helps, bye, -- Richard Dawe richdawe AT bigfoot DOT com ICQ 47595498 http://www.bigfoot.com/~richdawe/