Re: Tricky wrapping problem

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

 



Mike McTernan wrote:
Hi,

I'm trying to wrap the functions in a library and having some problems
when static linking with GNU ld version 2.17.

The setup is that the library (actually linuxthreads) exports a bunch of
functions, but also makes use of some of its own functions internally
(mainly pthread_cond funcs).  The problem is that I only want to wrap
the functions as used by the external API, and not the internal usage so
as not to harm internal operations.
What I'd therefore like to do is get ld to resolve all references that
can be satisfied within the .a file itself as a first step, and to then
perform a link with the --wrap's and my application code.

I've been trying to use "ld -r libpthread.a -o n.a" and various other
options to try and resolve the internal references for a first pass, but
the output always comes out as a tiny file having been stripped of
symbols.
Are there any pointers or ideas as to how I can get this working?

Don't you normally run ranlib on the .a to build an index table first?

Tom

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux