This is the mail archive of the gcc@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]

libgcc problems


Hi,

It seems I found a good solution for our libgcc problems.
In general, we can link shared library without libgcc,
but we can use an import file with all global libgcc symbols
instead. This import file should begin with

#! .

line, which means that imported symbols will be resolved
from main executable. As I understand this works on all AIXes.
We also can use a reduced libgcc when building shared library and
can use an import list which contains, for example, only global variables.
This avoids overhead with glink code for libgcc's functions, but
make impossible automatic generation of import list by collect2.

I checked that such solution works, and it can solve most problems
when linking shared object with a static library. The only possible
problem is if a shared library will be loaded via dlopen(). I'm not
sure that in this case imported symbols will be resolved (David,
remember my unaccepted -dll collect2 flag? With the solution above
it also can be used to tell collect2 that we should use real library
instead of import list).

Regards,
Andrey.



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