Subject: Re: dynamic loading
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 11/09/2002 00:10:09
On Fri, 8 Nov 2002, Patrick Welche wrote:

> I just booted up a laptop with an install disk, and find I want real grep
> (as opposed to sed). I made some memory disks for /lib /usr/lib /libexec,
> ftp'd /usr/bin/grep /lib/libc.so... /usr/lib/libintl.so...
> /libexec/ld.so_elf chmod'd 555 and made a load of links eg /usr/lib/libc.so
> -> /lib/libc.so.12.88. Running grep gives me "Syntax error: word
> unexpected.." I suspect I missed something, but what? ld.so.conf isn't
> needed is it? (Might be simpler to make a static grep in the meantime, but
> wouldn't mind learning what I missed!)

The programs in "/usr/bin" are looking for "/usr/libexec/ld.elf_so" to
interpret them. You can see what's in the ".interp" section of any ELF
binary linked shared by running "objdump -s" over it.

Frederick