This is the mail archive of the
mailing list for the binutils project.
Re: preprocessor macro to identify binutils version?
- From: Fred Cooke <fred dot cooke at gmail dot com>
- To: Burlen Loring <bloring at lbl dot gov>
- Cc: binutils <binutils at sourceware dot org>
- Date: Fri, 2 Aug 2013 21:49:39 +0200
- 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>
I spent a long time looking for this too, and failed. If there is, I'd
like to know about it. Otherwise I'll likely add a hack to binutils
for my use that provides this. That doesn't solve the general case,
It'd be nice if the CVS/Git ID/revision (replace with "tarball" or
similar if not in VCS) was included, and a detailed date stamp, too.
If these were introduced into core binutils people could at least make
use of this info into the future (which would be sufficient for my
On Fri, Aug 2, 2013 at 9:42 PM, Burlen Loring <email@example.com> wrote:
> On 08/02/2013 11:46 AM, Andrew Pinski wrote:
>> On Fri, Aug 2, 2013 at 11:49 AM, Burlen Loring <firstname.lastname@example.org> wrote:
>>> Hi All,
>>> This is my first binutils foray. I'm making use of libbfd to provide
>>> detailed stack trace in an app if it crashes. In testing I've found
>>> systems[*] with older binutils where bfd_find_nearest_line segv's. I'd like
>>> to configure my app to disable the stack trace feature on systems with the
>>> older binutils. Is there a preprocessor macro that can be used to idnetify
>>> the binutils release? if not what's the best way to determine the binutils
>> 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.