This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: import list creation on AIX and GCC 2.95-branch


Sorry for yeat another follow up, but I thought I should be more verbose
explaining why shared libraries depending on the symbols from the executable
are better than shared libraries with no working exceptions:

>       This design fails when one wishes to create a shared library with
> GCC and link or dynamically load the shared library with a non-GCC program
> (e.g., a Java JIT not compiled with GCC).
Explicit linking of the libgcc into the module should help here, although some
small hackery to add something like --disable-import flag to the collect2
invocation might be involved. Or one could simply rename libgcc.a and link it
in under that new name. The point is, there are numerous work-arounds for a
person motivated enough.

>  This also fails if the library
> utilizes C++ but the main program is just C, so the libgcc.a C++ symbols
> are not present.
This cannot happen, AFAIK. By default, AIX linker will export all symbols
required by the shared objects being used by the particular application, i.e if
pure C program will be linked against C++ shared module, the linker will notice
that _get_eh_context(sp?) symbol is required and will export it even though
application itself does not use it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]