Thu Jul 28 21:55:00 GMT 2011

Andy, All,

On Thursday 28 July 2011 22:32:25 ANDY KENNEDY wrote:
> This may be a buildroot issue, but I don't know.  Looking around shows
> that this is supposed to be part of ???binutils??? though the pkg name
> that produces results in Google is bfd. comes from the package named, guess it... libelf ! :-)

> The question:  I'm attempting to get a shared libelf, however, the only
> one that ends up in my sysroot (I think from the buildroot bastardized
> install I do to put libs back into the toolchain) is libelf.a. I was
> half-way tasked to find the shared object.  So, where does that puppy
> live?

That should ultimately be a question for the buildroot guys. But see below.

> Looking at the GNU website, there is a bfd which redirects to
> binutills.  Rock!  I say to myself, I should be able to get that.  Next
> I open up my good ole ct-ng menuconfig and see an option in Binutils
> "install libs in target".  Excellent! I says to myself again.  But,
> alas, that doesn't give me what I want.

Indeed. libelf is not from binutils, but from libelf. ;-)
crosstool-NG builds a static-only version of libelf for the target,
because it is needed by ltrace.

Only the static version is built, because I don't see it as being a system
library. ltrace is here as a debug tool, and it goes along with the other
debug tools. And as lbelf is not a system lib, we just use the static
version to link ltrace against it. Deselect ltrace, you won't get libelf.

The error was to install libelf in the sysroot in the first place. It
should not have gone there, it should have been in a temporary place that
gets trashed after ltrace is built.

Again: libelf is *not* a system library. The existence of the static version
in the sysroot is just hapenstance, and a side effect of ltrace being there.

You should not rely on libelf's presence in the sysroot.

> The ultimate goal is to get mpatrol in the toolchain so we can track
> down this memory leak we have.  Though, I'm only working on this like
> 2% of my time.  Hoping someone out there knows the answer to my pain.

Buildroot (which it seems you are using) already has a libelf package.
Use that.

Yann E. MORIN.

|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

For unsubscribe information see

More information about the crossgcc mailing list