From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 23 15:08:22 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BF8BA106566C for ; Sat, 23 Jan 2010 15:08:22 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 024A78FC0A for ; Sat, 23 Jan 2010 15:08:21 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o0NF8H6w094998 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 23 Jan 2010 17:08:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o0NF8HvC001327; Sat, 23 Jan 2010 17:08:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o0NF8HlA001326; Sat, 23 Jan 2010 17:08:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 23 Jan 2010 17:08:17 +0200 From: Kostik Belousov To: Alexander Best Message-ID: <20100123150817.GJ59590@deviant.kiev.zoral.com.ua> References: <20100123133419.GI59590@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BGXdj9oeR8eUT83d" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: [patch] extending/completing brandelf's OS knowledge X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jan 2010 15:08:22 -0000 --BGXdj9oeR8eUT83d Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 23, 2010 at 03:38:08PM +0100, Alexander Best wrote: > oh. i thought brandelf's purpose was to adjust an executable's OS ABI on a > general basis. an example would be having solaris executables with the OS= ABI > set to 0. although freebsd won't support running these binaries brandelf = could > be used to correct the OS ABI value which might come in handy if you're u= sing > freebsd for backup purposes e.g. >=20 > or is this purpose covered by a different application in the base dir? I do not see a need for such rudimentary ELF editor in the base at all. Ports do have "hacker tools". After the work of dchagin@/bz@, brandelf is needed only for the corner cases, if at all. >=20 > cheers. > alex >=20 > Kostik Belousov schrieb am 2010-01-23: > > On Sat, Jan 23, 2010 at 01:07:44PM +0100, Alexander Best wrote: > > > patch is pretty self explanatory i guess. brandelf should now be > > > able to > > > handle all OSes defined in the current SCO elf specs (26.10.2009). >=20 > > > cheers. > > > alex >=20 > > > Index: usr.bin/brandelf/brandelf.1 > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > --- usr.bin/brandelf/brandelf.1 (revision 202848) > > > +++ usr.bin/brandelf/brandelf.1 (working copy) > > > @@ -27,7 +27,7 @@ > > > .\" > > > .\" $FreeBSD$ > > > .\" > > > -.Dd February 6, 1997 > > > +.Dd January 23, 2010 > > > .Dt BRANDELF 1 > > > .Os > > > .Sh NAME > > > @@ -62,10 +62,25 @@ > > > .Ar string > > > ABI type. > > > Currently supported ABIs are > > > +.Dq Li SVR4 , > > > +.Dq Li HPUX , > > > +.Dq Li NetBSD , > > > +.Dq Li Linux , > > > +.Dq Li Hurd , > > > +.Dq Li 86Open , > > > +.Dq Li Solaris , > > > +.Dq Li AIX , > > > +.Dq Li IRIX , > > > .Dq Li FreeBSD , > > > -.Dq Li Linux , > > > +.Dq Li TRU64 , > > > +.Dq Li Modesto , > > > +.Dq Li OpenBSD , > > > +.Dq Li OpenVMS , > > > +.Dq Li HPNSK , > > > +.Dq Li AROS , > > > +.Dq Li FenixOS > > > and > > > -.Dq Li SVR4 . > > > +.Dq Li ARM . > > > .It Ar file > > > If > > > .Fl t Ar string > > > @@ -95,7 +110,7 @@ > > > .Rs > > > .%A The Santa Cruz Operation, Inc. > > > .%T System V Application Binary Interface > > > -.%D April 29, 1998 (DRAFT) > > > +.%D October 26, 2009 (DRAFT) > > > .%U http://www.sco.com/developer/devspecs/ > > > .Re > > > .Sh HISTORY > > > Index: usr.bin/brandelf/brandelf.c > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > --- usr.bin/brandelf/brandelf.c (revision 202848) > > > +++ usr.bin/brandelf/brandelf.c (working copy) > > > @@ -49,12 +49,25 @@ > > > const char *str; > > > int value; > > > }; > > > -/* XXX - any more types? */ > > > static struct ELFtypes elftypes[] =3D { > > > - { "FreeBSD", ELFOSABI_FREEBSD }, > > > + { "SVR4", ELFOSABI_NONE }, > > > + { "HPUX", ELFOSABI_HPUX }, > > > + { "NetBSD", ELFOSABI_NETBSD }, > > > { "Linux", ELFOSABI_LINUX }, > > > + { "Hurd", ELFOSABI_HURD }, > > > + { "86Open", ELFOSABI_86OPEN }, > > > { "Solaris", ELFOSABI_SOLARIS }, > > > - { "SVR4", ELFOSABI_SYSV } > > > + { "AIX", ELFOSABI_AIX }, > > > + { "IRIX", ELFOSABI_IRIX }, > > > + { "FreeBSD", ELFOSABI_FREEBSD }, > > > + { "TRU64", ELFOSABI_TRU64 }, > > > + { "Modesto", ELFOSABI_MODESTO }, > > > + { "OpenBSD", ELFOSABI_OPENBSD }, > > > + { "OpenVMS", ELFOSABI_OPENVMS }, > > > + { "HPNSK", ELFOSABI_NSK }, > > > + { "AROS", ELFOSABI_AROS }, > > > + { "FenixOS", ELFOSABI_FENIXOS }, > > > + { "ARM", ELFOSABI_ARM } > > > }; >=20 > > > int > > > Index: sys/sys/elf_common.h > > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > --- sys/sys/elf_common.h (revision 202848) > > > +++ sys/sys/elf_common.h (working copy) > > > @@ -113,6 +113,7 @@ > > > #define ELFOSABI_OPENVMS 13 /* Open VMS */ > > > #define ELFOSABI_NSK 14 /* HP Non-Stop Kernel > > > */ > > > #define ELFOSABI_AROS 15 /* Amiga Research OS > > > */ > > > +#define ELFOSABI_FENIXOS 16 /* FenixOS */ > > > #define ELFOSABI_ARM 97 /* ARM */ > > > #define ELFOSABI_STANDALONE 255 /* Standalone > > > (embedded) application */ >=20 >=20 > > This does not make a sense. brandelf(1) is (was) used as a way to > > specify > > hint for the FreeBSD kernel under which ABI emulation the binary > > should > > be activated. >=20 > > We do not support, and I believe never will, ABIs added in the patch. --BGXdj9oeR8eUT83d Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktbEOAACgkQC3+MBN1Mb4hc0gCghKbLwbFkzVokL2tRaC1jbKMC M58AnjW5wPWf6yZkSGxoPeh5n1njzRTQ =iiec -----END PGP SIGNATURE----- --BGXdj9oeR8eUT83d--