Subject: Re: poor error reporting when ld.so is missing
To: None <firstname.lastname@example.org>
From: Emmanuel Dreyfus <email@example.com>
Date: 04/21/2001 14:49:58
> The location of the interpreter is relative to the emulation's root,
> so the non existance of `/usr/lib/foo' does not imply the non existance
> of `/emul/foo/usr/lib/foo'.
Well the real problem is when you don't find /emul/foo/lib/bar, because
it is in /usr/pkg/emul/foo/lib/bar. This is a system setup error, and we
want to issue an accurate error message to give the user an opportunity
to understand what is wrong.
> It is sometimes not possible to determine directly from the executable
> image what type it is, espcecially ELF binaries that don't have notes
> specifying the operating system.
> Because of that, failure of one exec package does not mean that another
> exec package will also fail.
What about this: when the executable is matched by an exec package and
the interpreter can't be found, we set up a flag somewhere. If we tried
all the exec packages without success and if the flag is up, then
instead of trying to execute the file as a shell script, then we return
a ENOENT error.
That way we give a try to each exec packages, and we report a better
error. Anyone is against this?