This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFH: Annotating ELF binaries


On Sun, Nov 6, 2016 at 8:30 AM, Florian Weimer <fweimer@redhat.com> wrote:
> On 11/05/2016 12:57 AM, Ian Lance Taylor wrote:
>>
>> On Fri, Nov 4, 2016 at 8:02 AM, Nick Clifton <nickc@redhat.com> wrote:
>>>
>>>
>>>   We (the tools team at Red Hat) are working on a project to add
>>>   annotations to ELF binaries, so that we can answer various questions
>>>   about them.  We have set up a wiki page about the project here:
>>>
>>> https://fedoraproject.org/wiki/Toolchain/Watermark#Markup_for_ELF_objects
>>>
>>>   We would very much like this to be something more than just an
>>>   internal project, and so we are reaching out to you for your opinions,
>>>   suggestions and advice.  If you are interested in being able answer
>>>   questions such as 'how was this function compiled ?' or 'is this
>>>   library compatible with this application ?' then please take a minute
>>>   to have a look at the proposal.
>>
>>
>> Wearing my Go hat, I observe that you are mixing together general
>> properties ("Which (architecture specific) ABI variant is in use in
>> object X?") with language-specific properties ("agree upon the format
>> of long double?").  I encourage a clear separation of those two
>> different kinds of notes.
>
>
> I'm not sure how to draw the line.  I consider the size and format of “long
> double” very much an ABI matter.

Yes, it's an ABI matter, but it's specific to C/C++ programs.

> The psABI uses C types throughout, although it is used for much more than
> just C .  There is no language-independent name I know of for the floating
> point type larger than the type which resembles IEEE double precision
> floats.  But I would expect that Ada's definition of Long_Long_Float would
> have to be adjusted to align with ABI changes in this area.

The only sensible way to write the psABI is for it to say "this is how
to pass an 80 or 128 bit floating point value."  The psABI can't say
"this is the size of the type 'long double'", because that is a matter
for the language and perhaps the compiler.  The best the ABI can do is
say "In C/C++, the type 'long double' is 80 (or 128) bits," which is
separate from the discussion of such a type should be passed between
functions.  Then each language can decide how to implement the
appropriate type--whether it should be the same as the C/C++ type
'long double' or not.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]