This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: .note.ABI-tag extension for Android
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: nick clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 27 Jun 2012 02:38:19 -0300
- Subject: Re: .note.ABI-tag extension for Android
- References: <1334964688.23845.3.camel@hactar> <4FA14E7F.40500@redhat.com>
Hello Nick,
Sorry for the long hiatus, I spent some time studying this and also was
sidetracked for a while...
Thanks for your comments!
On Wed, 2012-05-02 at 16:10 +0100, nick clifton wrote:
> > I'm discussing with Google engineers about adding a .note.ABI-tag to
> > Android binaries, and extending the note format to allow identifying an
> > Android application.
>
> Why not use the ELF header for this ? You have the ei_osabi value in
> the e_ident field for example which is already used to encode different
> flavours of Linux.
>
> Of course this does not provide much room to defined the Android API in
> use...
I had this idea too, but it turns out that these fields are meant for
changes to the ELF format, so that the file can be read correctly. I
found a heated discussion about this on the binutils mailing list:
http://sourceware.org/ml/binutils/2000-11/msg00367.html
With the following very informative e-mail:
http://sourceware.org/ml/binutils/2000-11/msg00383.html
> > os_variant: 1
> > android_api: 15
> >
> > I arbitrarily chose os_variant = 1 to mean Android.
> >
> > So the idea is that if desc size is>= 20, then the fifth 32-bit word
> > will be examined. If it is 1, then this is an Android ELF file. The
> > sixth word will then tell you the API level the application expects.
>
> Are there a large number of Android APIs ? I am wondering if it is
> necessart to have two new 32-bit fields, or whether it would be more
> efficient to combine them into just one ?
That's a good point. Actually, Roland McGrath mentioned that since
the .note.ABI-tag format I want to change uses the "GNU" vendor, it is
reserved for GNU tools and I shouldn't extend it. I am now dropping that
original proposal and changing my patch to use a .note.android.ident
section containing only the API level in the desc field. Now I am indeed
using only one field.
I had also asked for comments on the lsb-discuss mailing list and got
some answers there, if you would like to follow it:
http://lists.linuxfoundation.org/pipermail/lsb-discuss/2012-April/007228.html
There was a message from Roland which wasn't linked to the original
thread by the webarchive frontend:
http://lists.linuxfoundation.org/pipermail/lsb-discuss/2012-May/007243.html
And the answer I just sent there:
http://lists.linuxfoundation.org/pipermail/lsb-discuss/2012-June/007281.html
--
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center