[Bug target/13391] AIX: collect2 emits bad code with duplicated symbols

greed at pobox dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 20 21:13:00 GMT 2004


------- Additional Comments From greed at pobox dot com  2004-01-20 21:13 -------
OK, if I update:
- TestThreadFunction2.H so that it defines templates A_Factorial and
B_Factorial, which differ in name only are are identical to the original
Factorial template,
- TestThreadFunction.C so that it instantiates A_Factorial,
- TestThreadFunction2.C so that it instantiates B_Factorial,
- collect2.c so that it does NOT emit a definition of _GLOBAL__DI or
_GLOBAL__DD, and also does not emit an export for those symbols,
- the linker flags to include -Wl,-bH:0 (so that link warnings result in a
failed link)

the program still abort()s.

Sometimes it doesn't abort, however running slibclean will cause the next
invocation to abort.  I haven't figured out what needs to be done to guarantee
success or failure.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13391



More information about the Gcc-bugs mailing list