egcs and shared LIBS on AIX4.1.5

Groove, Christian groove@norcom.de
Wed Mar 17 02:49:00 GMT 1999


Hello

i have got a serious problem with the egcs compiler, that also
affects the g++ compiler on the AIX4.1.5 (others too) operating
system.
 
I would like to create shared libraries on that plattfrom written
of course in C++. I would also like to use global (instantiated)
objects/classes, that should be automatically instantiated, when 
the shared lib gets loaded.
This task is a general problem for AIX (with their braindead XCOFF)
linker, true ELF linkers (Linux Solaris) do not have any problems 
with this, provided that you have a good C++ compiler installed 
(i.e. egcs)

OK, IBM also offers an C++ compiler, and in order to get a workaround
they introduced so called priorities pragmas and a ld-linker wrapper,
that helps to create shared libs. 
Due to the poor debugging support and the limited language capabilities
of the IBM compiler, i would like to switch to egcs/g++ and gdb/ddd.

Now the question, who do i introduce priorities in g++, so that the
linker remarks the C++ classes as to be initialized, when the shared
lib gets loaded. 

Thanks in advance

Christian Groove



Christian Groove
NorCom GmbH
81929 Muenchen, Stefan-George-Ring 6
Tel.: + 49 89 93948 271  Fax: + 49 89 93948 111
Mail: groove@norcom.de




More information about the Gcc-bugs mailing list