Problems with AIX and shared libs
Andrey Slepuhin
pooh@msu.ru
Wed Jun 30 23:07:00 GMT 1999
Hi Didier,
Please look into your ld man page and find the section
"Import and Export File Format". Then look if this section
contains a paragraph like the following:
#! . (A single dot) This name refers to the main executable. Use
this file name when you are creating a shared object that imports
symbols from multiple main programs with different names. The main
program must export symbols imported by other modules, or loading
will fail. This import file name can be used with or without the run-time
linker.
If no, and if you have installed all APAR fixes, than
probably AIX4.1.5 linker cannot handle importing from main executable.
In such case you can search collect2.c file from egcs distribution
for function use_import_list(). Comment all lines except "return 0".
Then search for function write_import_list(). Comment line
fprintf (stream, "%s\n", "#! .");
After rebuilding egcs all should work fine.
NOTE: After all these operations you shouldn't use any C++
code containing exceptions or RTTI together with shared libraries.
However, if your ld man page says that your linker is capable
to handle imports from main executable, than probably something
goes wrong for you. Unfortunately I have no AIX4.1.x box around
to play with, but as an author of collect2 rework for AIX I'm very
interested if you'll get any success.
Regards,
Andrey.
More information about the Gcc-bugs
mailing list