From owner-freebsd-emulation@FreeBSD.ORG Wed Sep 4 17:56:16 2013 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CAF62BE7 for ; Wed, 4 Sep 2013 17:56:16 +0000 (UTC) (envelope-from brunolauze@msn.com) Received: from blu0-omc1-s13.blu0.hotmail.com (blu0-omc1-s13.blu0.hotmail.com [65.55.116.24]) by mx1.freebsd.org (Postfix) with ESMTP id 926CB27C6 for ; Wed, 4 Sep 2013 17:56:16 +0000 (UTC) Received: from BLU179-W51 ([65.55.116.9]) by blu0-omc1-s13.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 4 Sep 2013 10:55:10 -0700 X-TMN: [Zlmlecjl9K0ZktpKpoKvv+OTGziY4nWW] X-Originating-Email: [brunolauze@msn.com] Message-ID: From: =?iso-8859-1?B?QnJ1bm8gTGF1euk=?= To: "freebsd-emulation@freebsd.org" Subject: Linuxulator Dynamic Paths Date: Wed, 4 Sep 2013 13:55:10 -0400 Importance: Normal MIME-Version: 1.0 X-OriginalArrivalTime: 04 Sep 2013 17:55:10.0520 (UTC) FILETIME=[E60EAB80:01CEA997] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 17:56:17 -0000 Hi=2C=20 I trying to see how dynamic paths could be implemented in the linuxulator t= o handle multiple linux base installation. Everything would still default to /compat/linux but an environment variable= could change it so we can execute multiple applications from multiple ins= tallation. =20 Here's the two file that would need to be changed: =20 sys/compat/linux/linux_util.c: =20 const char linux_emul_path[] =3D "/compat/linux"=3B sys/amd64/linux32/linux32_sysvec.c: =20 static Elf32_Brandinfo linux_brand =3D { .brand =3D ELFOSABI_LINUX=2C .mac= hine =3D EM_386=2C .compat_3_brand =3D "Linux"=2C .emul_path =3D "/compat/l= inux"=2C .interp_path =3D "/lib/ld-linux.so.1"=2C .sysvec =3D &elf_linux_s= ysvec=2C .interp_newpath =3D NULL=2C .brand_note =3D &linux32_brandnote=2C = .flags =3D BI_CAN_EXEC_DYN | BI_BRAND_NOTE}=3B static Elf32_Brandinfo linux_glibc2brand =3D { .brand =3D ELFOSABI_LINUX= =2C .machine =3D EM_386=2C .compat_3_brand =3D "Linux"=2C .emul_path =3D "/= compat/linux"=2C .interp_path =3D "/lib/ld-linux.so.2"=2C .sysvec =3D &elf= _linux_sysvec=2C .interp_newpath =3D NULL=2C .brand_note =3D &linux32_brand= note=2C .flags =3D BI_CAN_EXEC_DYN | BI_BRAND_NOTE}=3B =