libgcc problems

Andrey Slepuhin pooh@msu.ru
Mon Jan 19 02:30:00 GMT 1998


On 18-Jan-98 David Edelsohn wrote:
>>>>>> Andrey Slepuhin writes:
> Andrey> 2) Should we make a patch to move all libgcc's static variables
> Andrey> into separate shared module for AIX? If yes, I can prepare
> Andrey> such patch - this is not difficult and needs only few
> Andrey> changes (I'm already have 80% of such patch).
> 
>       This probably is the cleaner solution and will work regardless of
> the AIX options.

But will this solution be accepted by egcs maintainers?

> 
> Andrey> 5) Should we hope that a problem with correct TOC restoring will be
> Andrey> fixed?
> 
>       Is this really a bug?  If I followed the earlier discussions, I
> think this is a problem of mixing setjmp/longjmp across shared libraries.
> But the AIX TOC anchor simply is a dedicated GPR which should be saved and
> restored by setjmp/longjmp.  I guess that I do not understand why the TOC
> is getting corrupted in this case.  Or should save/restore_stack_nonlocal
> always save and restore the TOC as well as the backchain because the
> parent function may be in a different module with a different TOC?  And
> somehow the receiver automatically is suppose to find and fix its TOC
> anchor when there was no accompanying store to prepare the value
> beforehand?

Unfortunately my knowledge in discussed problem is poor, but the problem
occures not only when building shared libgcc. The following trivial
example (testsuite is attached) shows that throwing an exception from
shared library is totally broken on AIX due to the same reason.
(I also have this test failed on x86 linux with egcs-1.0 installed,
but didn't look why yet).
I'm also worried about duplicated __tiPc symbol. What does it mean?
should I prevent exporting it in collect2?

Regards,
Andrey.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: throw-from-shared-test.tar.gz
Type: application/x-gzip
Size: 522 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/19980119/b5a270d6/attachment.bin>


More information about the Gcc mailing list