From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrey Slepuhin To: egcs@cygnus.com Subject: egcs on AIX: native or gnu ld? Date: Fri, 17 Oct 1997 03:12:00 -0000 Message-id: <344739F5.F5CE5A83@msu.ru> X-SW-Source: 1997-10/msg00697.html Hi, Last week I had intensive testing of two builds of egcs-971008 on AIX 4.2.1 - with gnu ld (from gas-970915) and with native ld (both with --enable-shared option). All my examples were compiled and executed fine with both installation except some questions. 1) what means gnu ld warning ld: warning: attempt to export undefined symbol `global constructors keyed to f(void)' when I tried to test -frepo option? Without this option I didn't get any warnings. And what means `global constructors keyed to f' in context of non-member function f? It seems that this warning does not affect program execution 2) It seems that I cannot use native linker with option -frepo, because collect normally reads .rpo files but collect2 exits due to return code 8 of linker (undefined symbols) 3) When using native linker to build shared libraries I permanently receive warnings about the following duplicate symbols (which are automatically generated during link stage): ld: 0711-224 WARNING: Duplicate symbol: ._GLOBAL__DI ld: 0711-224 WARNING: Duplicate symbol: ._GLOBAL__DD ld: 0711-224 WARNING: Duplicate symbol: _GLOBAL__DI ld: 0711-224 WARNING: Duplicate symbol: _GLOBAL__DD What these symbols mean? I tried to look into source of automatically generated .c files, and it seems that these functions call something like module initialization functions (am I right?), so they differ in each shared object. I didn't saw any effect of such duplication, but I'm not sure that this is right thing. 4) I successfully build omniORB2 2.0 with both installations of egcs, but in case of using gnu linker the most of examples fail (segmentation fault). I tried to debug these examples but without success :-(. May be this is a bug of omniORB, but I'm not sure, because all works fine with native ld (both dynamic and static libraries) and with gnu ld (static libraries). The only idea I have is that these segmentation faults are in reference with using shared libraries in multithreaded environment. 5) What about including support of shared libraries with native ld to the future snapshots of egcs? Now I am using hacked version of system script makeC++SharedLib, but it only needed for generating correct exports list. At least, I have no problems yet with shared libraries built with native ld. 6) Does anybody has an experience of building and using egcs on AIX? I didn't saw any messages in mailing lists (but may be they have no problems? :-)) Regards, Andrey Slepuhin, Moscow State University