Mostly static binaries with crunchgen
John Baldwin
jhb at freebsd.org
Tue Dec 20 07:28:59 PST 2005
On Tuesday 20 December 2005 06:41 am, Ceri Davies wrote:
> Adrian Steinmann's talk at EuroBSDcon regarding a single user SSH daemon
> for rescue purposes highlighted an interesting point regarding some
> binaries. The GEOM userland binaries such as gmirror, gstripe, etc. use
> dlopen() to load classes from /lib/geom and therefore cannot be
> statically linked and, by extension, cannot be crunched with crunchgen.
>
> Adrian mentioned that it would be useful if crunchgen(1) supported
> "mostly static" binaries; i.e., a libs_so extension to crunchgen which
> would allow these binaries to be crunched, simply requiring then that
> rtld and the libraries be made available on the memory disk. This
> allows those of us who use GEOM classes to make a small rescue disk.
>
> I started to add this to crunchgen on the way home, and have worked with
> Adrian to finish it off. The patch is attached. It simply adds a
> "libs_so" keyword which specifies libraries that will be linked
> statically; all current config files continue to produce the same code
> as they did before.
>
> I'd like to commit this with a 6 week MFC period or so, but my mentor is
> currently busy. Could someone else please take this up?
I don't think you should change TORTIOUS to TORTUOUS in the license. Reading
license disclaimers may indeed be tortuous, but tortious is an actual legal
term, not a misspelling. It comes from the root word 'tort' which is a legal
word for 'sue' (basically).
The other concern is does this force the entire crunch to require a working
rtld now? If so, that would mean that this wouldn't be appropriate for
something such as /rescue. If there were a way to statically link rtld into
the crunch itself that would probably be ideal, but I'm not sure that is
possible.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the freebsd-hackers
mailing list