Linking object files created by different GCC compiler versions

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

 



Hello,

I'm trying to link object files originally created by different GCC versions together into one elf file.
Some object files were created by GCC 4.3.2, others by GCC 4.6.0. Unfortunately I get errors during final linking, having unresolved symbols. This seems to be due to the fact, that the used compiler versions seem to create different symbols for the same function/method.

One example:
We implement the new operators by our own:
void * operator new(size_t size);
The symbol created by GCC 4.3.2 is _Znwm
The symbol created by GCC 4.6.0 is _Znwj

There are more examples, also concerning class methods having differing symbols, like
_ZN12BlockManager10mallocEm for GCC 4.3.2
_ZN12BlockManager10mallocEj for GCC 4.6.0


I'm sure this behaviour is intentional, but is it possible to resolve those issues? Can I tell both compilers to behave the same or map symbols to each other?

Any help is appreciated, thanks,
  Steffen







[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