This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: preprocessor macro to identify binutils version?
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Burlen Loring <bloring at lbl dot gov>
- Cc: Andrew Pinski <pinskia at gmail dot com>, binutils <binutils at sourceware dot org>
- Date: Fri, 02 Aug 2013 15:12:13 -0500
- Subject: Re: preprocessor macro to identify binutils version?
- References: <51FBFF22 dot 6050107 at lbl dot gov> <CA+=Sn1=T5pOiTqwYSj1Y251b=hMCrXRojF=ONxQUgmObcG4w1g at mail dot gmail dot com> <51FC0BAB dot 2070901 at lbl dot gov>
On Fri, 2013-08-02 at 12:42 -0700, Burlen Loring wrote:
> On 08/02/2013 11:46 AM, Andrew Pinski wrote:
> > Won't it be better to use libdwarf and not use bfd?
> > BFD is not designed to be used outside of binutils/gdb. Any use
> > outside of it I consider it a bug.
>
> That's fairly discouraging news. I was not aware of the intention to
> keep libbfd use internal to binutils/gdb. I will look into porting to
> libdwarf. However, if there's a reliable way to identify binutils
> versions it would be helpful. I'd like to make use of this code during
> the port.
The problem with using libbfd outside of binutils/gdb, is that by
design, the libbfd API is not fixed and can change from release
to release, even day by day. That means your use of libbfd
would have to track those changes. Either that, or do as some
OSS projects do, and import a copy of the libbfd source into your
project... with the requisite issues with OSS licenses etc.
Peter