http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52765
--- Comment #7 from christophe.lyon at st dot com 2012-03-29 15:45:42 UTC --- It doesn't work in my context: - symbol versioning does not apply to static libraries (as already said, I'm using --disable-shared) - the problem is not that the library is exporting unwanted symbols, but that it is referencing symbols which happen to be defined in the user main.o with a different prototype. main.o defines and calls real() libstdc++.a (complex_io.o) calls real(), but expects the version defined in libstdc++.a which has a different prototype from the one in main.o. However, it uses the version in main.o by link rules. Another possible fix could be to add the always_inline attribute in the library, or make sure to distinguish both prototypes.