GCC on AIX static objects initialization in dynamic libraries

Raffy Aslanbeily raffy.aslanbeily@gmail.com
Wed Nov 16 14:18:00 GMT 2005


Hello,

There is a strange problem - when building a dynamic library, AIX
runtime linker doesn't initialize properly the static objects that are
inside this library. For example, if there is a static STL string in
one of source files and I try to use this string in one of other
objects, it fails with SIGSEGV because that string is simply not
initialized properly.
I am using GCC 3.4.3 on AIX 5.3 with its own ld (GNU LD doesn't work
on AIX at all).
That is to say, that when I compile the same example with xlC,
everything works fine (just like in Solaris or Linux using the same
GCC 3.4.3).

Thanks in advance,
Raffy



More information about the Gcc-help mailing list