Date: Tue, 02 Aug 2005 17:02:20 -0700 From: Julian Elischer <julian@elischer.org> To: Doug Ambrisko <ambrisko@ambrisko.com> Cc: FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: static binaries, jails and compat x Message-ID: <42F0098C.8070805@elischer.org> In-Reply-To: <200508022329.j72NTu8G014465@ambrisko.com> References: <200508022329.j72NTu8G014465@ambrisko.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Doug Ambrisko wrote: >Julian Elischer writes: >| Now that we have dynamic binaries everywhere I'm discovering all those >| places >| where this breaks.. >| >| FreeBSD 5 or 6 machine. (needed because freeBSD 4 can't run on the new >| hardware) >| freeBSD 4 jail to run a legacy app. >| ps top and netstat (and friends) don't work (not surprisingly) >| ps I can get from /rescue >| but top and netstat are only available in dynamic form. > >Hey, it gets harder when you run FreeBSD 4.X on a FreeBSD amd64 machine and >have mixed i386/amd64 libs :-( I copy over the amd64 versions of ps etc. >and had to copy over some libs that conflict in names. In-order to get >around placement issues I binary edit them on the fly via sed: > sed -e 's/libkvm/libhvm/g' -e 's/libexec/libhxec/g' -e 's/libsbuf/libhbuf/g' > >etc. One thing I just found out was: > UNAME_s,r,v,m,p >and hacked libc's getosreldate & uname to use that stuff. I LD_PRELOAD >my lib of these then pkg_add -r, libtool etc. then just work and think >the are really running on FreeBSD 4.X. I wish if LD_PRELOAD lib's >didn't exist then it would just ignore it versus failing to run. I've made >that change locally. That way I can chroot in chroot without needing >the shims when not needed. > >It's a mess. Do you think the libc stuff should have the same type >of over-rides as the uname binary. I think so. > > I'd like to see the filename code be able to use /usr/compat/FreeBSD4/... like it does for Linux binaries at the moment. Can we brandelf FreeBSD 6 binaries differently so that they can be told apart from FfreeBSD 4 binaries by the kernel? >Doug A. > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42F0098C.8070805>