Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2013 06:45:55 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Andrew Turner <andrew@fubar.geek.nz>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: Adding a MACHINE_ARCH note
Message-ID:  <20130710034554.GW91021@kib.kiev.ua>
In-Reply-To: <20130709234837.559e3769@bender.Home>
References:  <20130709090744.0e497e7e@bender.Home> <32F979BD-FB5C-4111-9586-4C5E7C6DFA71@bsdimp.com> <20130709234837.559e3769@bender.Home>

next in thread | previous in thread | raw e-mail | index | archive | help

--KaGATWMbHYawn9zd
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Jul 09, 2013 at 11:48:37PM +0100, Andrew Turner wrote:
> On Tue, 9 Jul 2013 08:19:46 -0600
> Warner Losh <imp@bsdimp.com> wrote:
> > I thought that the ELF headers gave us all the data we needed to know
> > how things were built...
>=20
> It will tell us if it was for e.g. an ARM or MIPS ELF file, but I'm not
> sure how we can tell the difference between an arm and an armv6 ELF.
>=20
> With armv6 there are a few changes in the userland/kernel
> interface, e.g. reading the thread local storage pointer is different
> such that an armv6 static binary would not run on an ARMv5 core as it
> uses newer instructions.

Initially, I thought that you want to differentiate binaries based on the
features of the ISA used.  I am not aware of any portable convention
to do this.  For SPARC ISA extensions, Sun invented DT_SUNW_CAP tag.
IMHO using tag instead of note is slightly better there.

But, your later note suggests that you actually worry about the ABI,
and not ISA features, right ?  There is EI_OSABI byte in the e_ident
member of the ELF header, and you could allocate an new ABI identifier
for FREEBSD ARMv6, with corresponding changes in the ELF image
activator.

Whatever method of branding is used, IMO you should really discuss
this with the architecture owners, i.e. ARM.  If any other OS would
invent similar branding with the different implementation, it is
detrimental to the whole arch ecosystem, I think.

--KaGATWMbHYawn9zd
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iQIcBAEBAgAGBQJR3NjyAAoJEJDCuSvBvK1BwYIQAKaNFh2dr632Z+nJ3eZxgQsx
M2F/Q+JG8ofg+iYBxr4gw+jir0HftbTTOBSLfiaxPK/efq3LP7eQcTKFHzURPPMY
CAPtydAYgebZmUU2NDu6Af825yisYPeSRDZjLgIEwGbGEccRR5DswEOuasFxwI5e
PHojW2Qqg1GamjdBRrC3ZNZLrR7J7u9YxX2aqdh1VHW0V/0lzzRcWbgOuVN2B4Gt
hyRd2lZ59+KIjFfqstDb5karlV33uFZjC/hb49BRQbydUvsH3aTFiRyNYopfGE77
AfmzUUMsbxOPP0nqJPnVP9WTLZSL3wgWOZnTktNRwFbsNagSMxfNSy0wYR3/Jtxt
yFDoTcDQCNsfkxLIY0E5bj2M6fs06iiYdvYWlA6QFLv+Bq3xSoY0U0Vl0cpoNAKG
7Ri18hhLrBbLwo86jh2Cwqw3v/v/WPVIIIA9bEqhaouTjIt37v8OvM3SrfMQucMj
MpBhnXURwun8MXtQF4E7iEYDwp7Flx9UOPCBhMN1NVpwz9lYqgfe2gRGsjbENoEC
eatET4o7PL8n2seclFh7A3sDPypztvHdAdoW+hR5/xqSQh2wxeV6pcyc683O4VLe
OTYg8lhZz7To0Xdn74/pzidzS0fUlHxwk3EzAFyHSQyxtyelAiJF33cDKFWKn57L
mmzE9frpbdy+cLZ6gx/p
=w6zG
-----END PGP SIGNATURE-----

--KaGATWMbHYawn9zd--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130710034554.GW91021>