Ed,

Apologies for the delay.

I made and installed libelf with the debug flags. It put itself in
/usr/lib (I wasn't quite expecting that).

Whenever I invoke many binaries on FreeBSD, I get this error message:

/usr/lib/libelf.so.1: version FBSD_1.0 required by
/usr/lib/libexecinfo.so.1 not found

What did I do wrong?

--Sam

On Mon, May 16, 2016 at 1:13 PM, Sam Habiel <sam.hab...@gmail.com> wrote:
> Thank you Ed! You're a swell guy, as they say in the 50's.
>
> I will reply to you next week, when I get a chance to actually perform
> these steps.
>
> --Sam
>
> On Mon, May 16, 2016 at 12:25 PM, Ed Maste <ema...@freebsd.org> wrote:
>> On 15 May 2016 at 22:05, Sam Habiel <sam.hab...@gmail.com> wrote:
>>>
>>> Having said that though, I don't have enough experience in FreeBSD to
>>> be able to answer all your questions; and I never had to use gdb to
>>> debug a linked library before. Let me answer and ask in turns:
>>
>> Sorry about that - I wasn't sure how much or little detail to provide.
>> I'm happy to work through the details with you.
>>
>>> 1. I downloaded FreeBSD 10.3 and libelf came with the system without
>>> me installing anything. I presume then it's in the FreeBSD source tree
>>> since I didn't install that one from the ports tree, correct?
>>
>> That's correct.
>>
>> jkoshy@ and others developed the BSD-licensed libelf in FreeBSD
>> starting in the mid-2000s, and it's still that version that's in
>> FreeBSD 10.
>>
>> libelf and other tools moved from FreeBSD to the ELF Tool Chain
>> project  out to ELF Tool Chain later on, and were reimported into
>> FreeBSD for FreeBSD 11.
>>
>>> 2. Where is the upstream version? And how can I compile it to replace
>>> the ones that my makefile grabs? (I think I can figure this one out,
>>> but a hint will help).
>>
>> You can get it here:
>> svn checkout svn://svn.code.sf.net/p/elftoolchain/code/trunk 
>> elftoolchain-code
>> A top level 'make' will build libelf, libdwarf, and ELF Tool Chain
>> versions of strip, nm, size, etc.
>>
>> Adding -L (and -I) options to CFLAGS when building your software
>> should be sufficient to pick it up. You mentioned that it works with a
>> libelf from ports, and the same scheme used to build against that one
>> should work for your own elftoolchain build.
>>
>>> 3. How do use gdb to step into such a library? Would just typing "s"
>>> take you into the code if everything else is in place?
>>
>> Yes. You can build the library with -g, and -O0 to make debugging work
>> better. E.g., with flags for 2. and 3.:
>> CFLAGS="-g -O0 -L/example/src/elftoolchain/libelf
>> -I/example/src/elftoolchain/libelf" make
>>
>> You can set a breakpoint on elf_update, and then step through to find
>> out where the error is returned.
>
>
>
> --
> Sam Habiel, Pharm.D.
> VISTA Expertise Network



-- 
Sam Habiel, Pharm.D.
VISTA Expertise Network

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://pubads.g.doubleclick.net/gampad/clk?id=1444514421&iu=/41014381
_______________________________________________
Elftoolchain-developers mailing list
Elftoolchain-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/elftoolchain-developers

Reply via email to