diff options
-rw-r--r-- | lkm/linux/linux.c | 7 | ||||
-rw-r--r-- | sys/alpha/linux/linux_sysvec.c | 12 | ||||
-rw-r--r-- | sys/i386/linux/linux_sysvec.c | 12 | ||||
-rw-r--r-- | sys/modules/linux/linux.c | 7 |
4 files changed, 28 insertions, 10 deletions
diff --git a/lkm/linux/linux.c b/lkm/linux/linux.c index 4055173..11898c3 100644 --- a/lkm/linux/linux.c +++ b/lkm/linux/linux.c @@ -25,7 +25,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: linux.c,v 1.11 1997/04/06 10:47:59 dufault Exp $ + * $Id: linux.c,v 1.12 1997/05/01 06:08:14 jkh Exp $ */ #include <sys/param.h> @@ -41,12 +41,13 @@ extern const struct execsw linux_execsw; MOD_EXEC(linux, -1, &linux_execsw); -extern Elf32_Brandinfo linux_brand; +extern Elf32_Brandinfo linux_brand, linux_glibc2brand; static int linux_load(struct lkm_table *lkmtp, int cmd) { - if (elf_insert_brand_entry(&linux_brand)) + if ((elf_insert_brand_entry(&linux_brand)) || + (elf_insert_brand_entry(&linux_glibc2brand))) uprintf("Could not install ELF interpreter entry\n"); /* uprintf("Linux emulator installed\n"); XXX - shut up, you! */ return 0; diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c index 4b1380c..1474094 100644 --- a/sys/alpha/linux/linux_sysvec.c +++ b/sys/alpha/linux/linux_sysvec.c @@ -25,7 +25,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: linux_sysvec.c,v 1.32 1998/08/16 01:21:50 bde Exp $ + * $Id: linux_sysvec.c,v 1.33 1998/09/14 05:36:48 jdp Exp $ */ /* XXX we use functions that might not exist. */ @@ -434,6 +434,13 @@ Elf32_Brandinfo linux_brand = { &elf_linux_sysvec }; +Elf32_Brandinfo linux_glibc2brand = { + "Linux", + "/compat/linux", + "/lib/ld-linux.so.2", + &elf_linux_sysvec + }; + #ifndef LKM /* * XXX: this is WRONG, it needs to be SI_SUB_EXEC, but this is just at the @@ -445,7 +452,8 @@ static void linux_elf_init(dummy) void *dummy; { - if (elf_insert_brand_entry(&linux_brand) < 0) + if ((elf_insert_brand_entry(&linux_brand) < 0) || + (elf_insert_brand_entry(&linux_glibc2brand) < 0)) printf("cannot insert Linux elf brand handler\n"); else if (bootverbose) printf("Linux-ELF exec handler installed\n"); diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 4b1380c..1474094 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -25,7 +25,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: linux_sysvec.c,v 1.32 1998/08/16 01:21:50 bde Exp $ + * $Id: linux_sysvec.c,v 1.33 1998/09/14 05:36:48 jdp Exp $ */ /* XXX we use functions that might not exist. */ @@ -434,6 +434,13 @@ Elf32_Brandinfo linux_brand = { &elf_linux_sysvec }; +Elf32_Brandinfo linux_glibc2brand = { + "Linux", + "/compat/linux", + "/lib/ld-linux.so.2", + &elf_linux_sysvec + }; + #ifndef LKM /* * XXX: this is WRONG, it needs to be SI_SUB_EXEC, but this is just at the @@ -445,7 +452,8 @@ static void linux_elf_init(dummy) void *dummy; { - if (elf_insert_brand_entry(&linux_brand) < 0) + if ((elf_insert_brand_entry(&linux_brand) < 0) || + (elf_insert_brand_entry(&linux_glibc2brand) < 0)) printf("cannot insert Linux elf brand handler\n"); else if (bootverbose) printf("Linux-ELF exec handler installed\n"); diff --git a/sys/modules/linux/linux.c b/sys/modules/linux/linux.c index 4055173..11898c3 100644 --- a/sys/modules/linux/linux.c +++ b/sys/modules/linux/linux.c @@ -25,7 +25,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: linux.c,v 1.11 1997/04/06 10:47:59 dufault Exp $ + * $Id: linux.c,v 1.12 1997/05/01 06:08:14 jkh Exp $ */ #include <sys/param.h> @@ -41,12 +41,13 @@ extern const struct execsw linux_execsw; MOD_EXEC(linux, -1, &linux_execsw); -extern Elf32_Brandinfo linux_brand; +extern Elf32_Brandinfo linux_brand, linux_glibc2brand; static int linux_load(struct lkm_table *lkmtp, int cmd) { - if (elf_insert_brand_entry(&linux_brand)) + if ((elf_insert_brand_entry(&linux_brand)) || + (elf_insert_brand_entry(&linux_glibc2brand))) uprintf("Could not install ELF interpreter entry\n"); /* uprintf("Linux emulator installed\n"); XXX - shut up, you! */ return 0; |