summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-07-29 18:39:35 +0000
committerdfr <dfr@FreeBSD.org>1998-07-29 18:39:35 +0000
commit4e0f5156dbdf15c90dab2eb19e28e881772ae5c5 (patch)
tree96d0b8a49454ca3158f41e908251cc1dbf670c87
parent7ccaec50823c99dda455743a57fa3d51ce17c230 (diff)
downloadFreeBSD-src-4e0f5156dbdf15c90dab2eb19e28e881772ae5c5.zip
FreeBSD-src-4e0f5156dbdf15c90dab2eb19e28e881772ae5c5.tar.gz
Default to FreeBSD if no brand detected. This makes life easier when
bootstrapping from NetBSD/alpha.
-rw-r--r--sys/kern/imgact_elf.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index 0235b59..96c0a5e 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) {
OpenPOWER on IntegriCloud