This is the mail archive of the
mailing list for the binutils project.
GNU ld linker wrapping
- From: "Shawn Yarbrough" <syarbrough at gelbergroup dot com>
- To: <binutils at sourceware dot org>
- Date: Fri, 2 Jun 2006 16:33:49 -0500
- Subject: GNU ld linker wrapping
Is this the right place to ask linking questions?
I'm hoping to use the linker to "protect" me from closed-source third-party libraries I can't get rid of. Some are static and some are shared. Some of the libraries use old versions of gcc/g++ such as g++-3.2.2.
My first idea, not yet attempted, is to use a thin C library to wrap the third-party 3.2.2 C++ library, only wrapping the few functions I need and ignoring all others, and then link the resulting C library against my own 3.4.5 ABI C++ code.
The third-party 3.2.2 library uses the older, version 5, C++ standard library that was normal for g++ 3.2.2. My code uses version 6. How would I tell the linker to use version 5 only for linking the third-party library, and use version 6 for linking everything else in my app?
Related to this I'm also wondering how to pull the third-party library into my wrapper library so that I only have to distribute one file.
Suggestions for better ways to attack this problem would also be welcome.
Senior E-Trading Developer
Gelber Group, LLC