Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Mar 1995 11:48:54 -0700
From:      Nate Williams <nate@trout.sri.MT.net>
To:        Bruce Evans <bde@zeta.org.au>, CVS-commiters@freefall.cdrom.com, cvs-share@freefall.cdrom.com
Subject:   Re: cvs commit: src/share/mk bsd.lib.mk
Message-ID:  <199503281848.LAA22601@trout.sri.MT.net>
In-Reply-To: Bruce Evans <bde@zeta.org.au> "Re: cvs commit: src/share/mk bsd.lib.mk" (Mar 29,  4:33am)

next in thread | previous in thread | raw e-mail | index | archive | help
> >  *Really* strip out unused local symbols from shared objects.

Results of not doing this:

> Should have been done for v1.1 in FreeBSD-1.1 :-).
> 	Lots of USEFUL static symbols.  Static symbols for functions and
> 	data are relatively rare in libraries (350 out of 1909 static
> 	text symbols in libc.so.2.0-current) so it would cost little
> 	to keep them.
> 
> libc.so.2.0 on 2.0R cdrom:
> 	Same as above.
> 
> libc.so.2.0 current:
> 	Same as above except LC* are expanded to <module_name>LC*.
> 
> This (replacing -x by -X) strips the useless symbols, the USEFUL symbols,
> and still expands LC*.

The latter behavior can be called a bug, the previous one can be called
a 'feature' since the linker apparently doesn't differentiate between a
static local symbol and a exported local symbol.

Regarding the USEFUL static symbols, I don't think it's a big deal to
anyone but library debuggers to keep them in.  And, those folks can
re-compile the libraries if they desire to keep those symbols in.  The
only place where they were kept in was the shlib, since all of the above
the symbols have been stripped from the non-profiled static libs from
day one.


Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199503281848.LAA22601>