Not providing static libraries (libkse/libpthread)

Daniel Eischen eischen at pcnet1.pcnet.com
Wed Mar 26 21:04:51 PST 2003


On Wed, 26 Mar 2003, Warner Losh wrote:

> In message <3E81F6BB.BFFE3F33 at vigrid.com> Daniel Eischen writes:
> : Is there a good reason for providing static libraries for
> : libpthread/libkse?  I'd like to not support them to get
> : rid of some hacks to make sure certain symbols are present
> : in the static library case.
> 
> That would be a big hassle for the company I work for.  We have many
> static binaries that are threaded and providing a dynamic one has a
> performance impact of a few percent.  While we have done dynamic
> linking in the past, and have the infrastructure to do so in the
> future in our build process, this may cause us problems in the future
> if we need to deploy a static binary (which tends to be safer to do
> once a long period of time has passed between the generation of the
> system and the deployment of the updated binary).
> 
> How gross are the hacks?

See libc_r/uthread/uthread_init.c (references[] and libgcc_references[]).
Also, in a lot of functions, there are:

	if (_thread_initial == NULL)
		_thread_init();

I'd like to be able to get rid of these eventually and perhaps have
some magical way of getting it called automatically when the library
is loaded.  If it was possible, I'm not sure that it would work in
both static and shared.

-- 
Dan Eischen



More information about the freebsd-arch mailing list