[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Client Executables size

On Wed, Jul 17, 2002 at 09:33:46AM +0200, samuel.osouf wrote:
> I wrote a client that performs ONLY the basic LDAP 
> operations : init, bind, search, unbind. It takes 
> MUCH LESS lines than OpenLDAP's ldapsearch.c. But 
> when I compile, I get a 200 Ko executable file, 
> while ldapsearch takes only 118 Ko !!

You have probably left the linking or debugging symbols in your
executable. Try using '-s' at the link stage, or running strip(1) on
the binary. You could also run size(1) on the binaries of ldapsearch
and your own program to compare the real code sizes.

Another possibility is that you have compiled your program for
debugging or profiling, but ldapsearch is built with different
options. Try building your program without '-g'.

> Can somenone explain ? This can't be just a 
> missing gcc option, and neither my client nor 
> ldapsearch use dynamic libraries.

It is very unusual these days for any program not to use dynamic
libraries. Perhaps this is part of your problem. ldd(1) will tell you
what dynamic libraries are required by a given binary.

|                 From Andrew Findlay, Skills 1st Ltd                 |
| Consultant in large-scale systems, networks, and directory services |
|        Andrew.Findlay@skills-1st.co.uk       +44 1628 782565        |