Allow execution of shared objects. This is silly, but is allowed in,
for example, Solaris and Linux, and at least one Linux ldd implementation even depends on it.
This commit is contained in:
parent
a131b893fb
commit
811a6162c3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: exec_elf32.c,v 1.44 1999/04/30 23:02:06 cgd Exp $ */
|
||||
/* $NetBSD: exec_elf32.c,v 1.45 1999/06/29 23:39:06 fvdl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@ -526,7 +526,12 @@ ELFNAME2(exec,makecmds)(p, epp)
|
||||
if (epp->ep_hdrvalid < sizeof(Elf_Ehdr))
|
||||
return ENOEXEC;
|
||||
|
||||
if (ELFNAME(check_header)(eh, Elf_et_exec))
|
||||
/*
|
||||
* XXX allow for executing shared objects. It seems silly
|
||||
* but other ELF-based systems allow it as well.
|
||||
*/
|
||||
if (ELFNAME(check_header)(eh, Elf_et_exec) != 0 &&
|
||||
ELFNAME(check_header)(eh, Elf_et_dyn) != 0)
|
||||
return ENOEXEC;
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user