libgcc problems with shared libraries
David Edelsohn
dje@watson.ibm.com
Wed Jan 14 04:17:00 GMT 1998
>>>>> Andrey Slepuhin writes:
Andrey> On AIX4.2 and later problem can be solved by the following way:
Andrey> 1) Linking shared library without libgcc but with -G ld flag (i.e. ready
Andrey> for run-time linking).
Andrey> P.S. I discussed a problem with some specialists in MSU, and they said
Andrey> that libgcc shouldn't contain such static variables as __terminate_func.
The static variable should not be in the libgcc.a library. If
SVR4/ELF can handle this, great; but that does not make this a properly
scoped symbol to include in a library. We should not be using one
particular linker and ABI and object file format to cover up a bad
implementation.
If AIX ld -G flag when linking a library fixes this, it probably
is because one of the implications of that flag is the AIX ld -berok flag
meaning that unresolved symbols are okay. -G implies much more and forces
the -brtl flag at application link time. If -berok is a workaround, that
option is present in all AIX releases and is not limited to AIX 4.2 and
later.
David
More information about the Gcc
mailing list