I've a library file which was built using g++ version 2.96. The source code of the lib is not available and also there is no support from the original developer.
I want to link it with my application using the latest g++ version (say 4.x). As I understand the name mangling scheme has changed since gcc veriosn 3.3 onwards. That's why the new linker does not recognize the symbols in the old lib file.
I've done some research on the net and studied tools like objcopy, objdump, c++filt and nm etc and tried to find and demangle the symbols in the lib file manually, but to no avail.
So, is there a way (or a tool) to transform my old binary lib file to the new name mangling scheme so I can link it using newer compilers?
No, this is not possible.
You can't just translate the mangled names, there are lots of other things that are not compatible between g++ 2.96 and g++ 4.x, including the layout of objects, the exception-handling mechanism, the standard library implementation, how virtual functions work etc.
Either get the source code for the old lib, or build everything with g++ 2.96, or replace the old lib with new code that has the same behaviour.