From a9d81f7c5cc7d67bbc9e85d9093a39ea1cc5148a Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Wed, 29 Jul 1998 18:39:35 +0000 Subject: [PATCH] Default to FreeBSD if no brand detected. This makes life easier when bootstrapping from NetBSD/alpha. --- sys/kern/imgact_elf.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 0235b5918b1..96c0a5e9738 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: imgact_elf.c,v 1.27 1998/07/11 10:28:47 bde Exp $ + * $Id: imgact_elf.c,v 1.28 1998/07/15 05:00:26 bde Exp $ */ #include "opt_rlimit.h" @@ -586,13 +586,20 @@ exec_elf_imgact(struct image_params *imgp) } } if (i == MAX_BRANDS) { +#ifndef __alpha__ uprintf("ELF binary type not known\n"); -#ifdef __alpha__ - uprintf("assuming FreeBSD\n"); - i = 0; -#else error = ENOEXEC; goto fail; +#else + i = 0; /* assume freebsd */ + imgp->proc->p_sysent = elf_brand_list[i]->sysvec; + if (interp) { + strcpy(path, elf_brand_list[i]->emul_path); + strcat(path, elf_brand_list[i]->interp_path); + UPRINTF("interpreter=<%s> %s\n", + elf_brand_list[i]->interp_path, + elf_brand_list[i]->emul_path); + } #endif } if (interp) {