libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libunwind] libbfd and libunwind?


From: David Mosberger
Subject: Re: [libunwind] libbfd and libunwind?
Date: Thu, 7 Apr 2005 14:48:20 -0700

>>>>> On Thu,  7 Apr 2005 12:58:27 -0700, Mike Bennett <address@hidden> said:

  Mike> Sorry if this is a FAQ, but I didn't see it in any recent
  Mike> archives.

  Mike> Is there a reason libunwind couldn't use libbfd for its object
  Mike> file manipulation (circular dependencies, code bloat, license
  Mike> disagreements, etc)?

  Mike> I'm finishing up a core file reader extension to libunwind
  Mike> and I'd prefer to use libbfd as it seems to be the 'canonical'
  Mike> core file reader library, supports a wide array of corefile and
  Mike> executable formats and is actively maintained, but I wouldn't
  Mike> want to create some nasty library dependency issue.

  Mike> If introducing bfd as a dependency is a problem I can revert
  Mike> to using straight ELF reading mechanisms (as there's only a
  Mike> handful of calls I need from BFD).

There is no single reason I'm trying to avoid BFD.  Bloat and an
additional dependency is definitely a factor.  Add to that that I'm
not sure libunwind will ever want to support non-ELF platforms (with
the possible exception of PE), I just don't think there is a whole lot
of value that BFD would add.  In fact, in many ways BFD makes things
more complicated because it restricts you what you can do (for
abstraction reasons) but in the end you still end up having to do deal
with the low-level, object-file-format-specific stuff.

Having said that, clearly we couldn't add an BFD-dependency to the
local unwinder (libunwind.so) since that's a core library that almost
every program links against.  The situation is similar for
libunwind-$PLAT.so, though there is no functional reason we couldn't
add a BFD-dependency there.

As far as a core-file unwinder is concerned: since it would be
implemented as a convenienence-library (libunwind-core.a, for
example), adding a BFD-dependency there would be OK, if it really
simplifies life a lot for you.  If it's not a lot more work, I would
prefer doing without BFD but in the end it's really your call.

Thanks,

        --david

reply via email to

[Prev in Thread] Current Thread [Next in Thread]