Mostly static binaries with crunchgen
Ceri Davies
ceri at submonkey.net
Tue Dec 20 07:58:25 PST 2005
On Tue, Dec 20, 2005 at 10:29:27AM -0500, John Baldwin wrote:
> 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).
Ah, I had parsed that as a whitespace change. Will revert :)
> 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.
No, just the dynamic bits require rtld.
Ceri
--
Only two things are infinite, the universe and human stupidity, and I'm
not sure about the former. -- Einstein (attrib.)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20051220/f28332d6/attachment.bin
More information about the freebsd-hackers
mailing list