Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Oct 2007 22:02:24 +0200
From:      Mel <fbsd.questions@rachie.is-a-geek.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: BASH as root shell (static linking)
Message-ID:  <200710062202.24321.fbsd.questions@rachie.is-a-geek.net>
In-Reply-To: <2E53DE70-20DE-4F97-8645-943F25AA3AF5@optusnet.com.au>
References:  <2F42244C-6F3F-48B3-AC05-FF068A791324@optusnet.com.au> <1191610761.28483.184.camel@soundwave.pitbpa0.priv.collaborativefusion.com> <2E53DE70-20DE-4F97-8645-943F25AA3AF5@optusnet.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 05 October 2007 22:51:53 Jerahmy Pocott wrote:
> On 06/10/2007, at 4:59 AM, Brian A. Seklecki wrote:
> > On Sat, 2007-10-06 at 04:54 +1000, Jerahmy Pocott wrote:
> >> Hello,
> >>
> >> I'm wanting to use BASH as my root shell, so I compiled a statically
> >> linked
> >> version then tried to log in with only / mounted. But I was locked
> >> out because
> >> elf.ld.so could not be found..
> >
> > JP:
> >
> > Did:
> >
> > $ ldd /bin/bash
> >
> > Return anything? It should not.
>
> It's saying:
>
> libintl.so.6 => /usr/local/lib/libintl.so.6 (0x2819d000)
> libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x281a6000)

Most likely because you thought changing CFLAGS/LDFLAGS during port build, 
would make it statically linked, however if the link command has 
additional -Wl,-dynamic statements caused by `foo-config --libs` or .la 
files, then linker will resolve those libraries dynamically.
As another poster stated in this thread, use the static option of the port.

-- 
Mel



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