PATCH: Dynamic /bin support

Gordon Tetlow gordont at gnf.org
Thu May 8 01:02:38 PDT 2003


I just hacked together support to have /bin dynamically linked. This
is the first step on the way to having everything play nicely with
nectar's work on getting NSS into the system. Here's the patch:

http://people.freebsd.org/~gordon/patches/dynamic.patch

WARNING: Don't install this on a system you care about, you'll
probably hose it beyond belief. My testbed was a pxe booted
diskless client. YMMV.

Here's the quick instructions:
Patch using the diff provided
Make a /lib directory
Compile and install src/libexec/rtld-elf
Make sure it installed into /lib/ld-elf.so.1 with a symlink from
  /usr/libexec/ld-elf.so.1
Do a full buildworld
Build a kernel (not sure if needed)
Do an installworld
Delete the old libs from /usr/lib, try the following shell script:
  cd /lib
  for i in *; do
    chflags noschg /usr/lib/$i
    rm /usr/lib/$i
  done

Your /lib should look like:
ld-elf.so.1     libc.so.5       libcrypt.so.2   libkvm.so.2     libncurses.so.5
ld-elf.so.1.old libcipher.so.2  libedit.so.4    libm.so.2       libutil.so.3

I've kind of abused SHLIBDIR in the Makefiles. If someone with more
make-foo could look it over. I've probably violated style all over
the place. Comments are welcome.

I'm working on /sbin support, but there are alot of additional libraries
that are needed for that one. I'll get to it.

Anyway, I'm really tired, but I wanted to post the patch. Please email
me with suggestions.

-gordon
-------------- 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-arch/attachments/20030508/bb174ac3/attachment.bin


More information about the freebsd-arch mailing list