public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* libgcc problems
@ 1998-01-16 20:09 Andrey Slepuhin
  1998-01-17 23:02 ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Andrey Slepuhin @ 1998-01-16 20:09 UTC (permalink / raw)
  To: law; +Cc: dje, egcs

Hi,

To finalize a discussion about multiple instances of static
variables in libgcc.a (and while egcs-980115 is bootstrapped :-)),
I want to obtain *precise* answers to the following questions:

1) Should we enable by default run-time linking for AIX 4.2 and later?
2) Should we make a patch to move all libgcc's static variables
   into separate shared module for AIX? If yes, I can prepare
   such patch - this is not difficult and needs only few
   changes (I'm already have 80% of such patch).
3) If 1)-2) unacceptable, should we try to do some dirty hack to solve
   a problem with the following method: using pointers to variables
   instead of variables itself in libgcc, and initializing these
   pointers when program starts. This is possible in principle,
   but needs some additional code to be automatically generated
   by collect2, and some changes in libgcc.
4) If 1)-3) is unacceptable I'll treat egcs's exception handling
   on AIX broken.
5) Should we hope that a problem with correct TOC restoring will be
   fixed?

Regards,
Andrey.

P.S. It seems there is a bug in egcs-980115 calls.c because of #ifdef
usage inside a macro. Below there is a possible patch.

^ permalink raw reply	[flat|nested] 25+ messages in thread
* Re: libgcc problems
@ 1998-01-20  2:21 Mike Stump
  1998-01-19 15:31 ` Andrey Slepuhin
  0 siblings, 1 reply; 25+ messages in thread
From: Mike Stump @ 1998-01-20  2:21 UTC (permalink / raw)
  To: law, pooh; +Cc: dje, egcs

If possible, making the variables external and weak or common might be
the way to go.

^ permalink raw reply	[flat|nested] 25+ messages in thread
* libgcc problems
@ 1998-01-20  5:48 Andrey Slepuhin
  1998-01-20  9:45 ` David Edelsohn
  0 siblings, 1 reply; 25+ messages in thread
From: Andrey Slepuhin @ 1998-01-20  5:48 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Jeffrey Law, egcs

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.


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~1998-01-20  9:45 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <5010300014296319000002L092*@MHS>
1998-01-15 16:30 ` libgcc problems pooh
1998-01-15 16:30   ` David Edelsohn
1998-01-15 16:30     ` Andrey Slepuhin
1998-01-15 16:30 ` pooh
1998-01-14 18:38   ` Jeffrey A Law
1998-01-15 16:06     ` Andrey Slepuhin
1998-01-15 16:30     ` David Edelsohn
1998-01-15 16:30       ` Jeffrey A Law
1998-01-16  1:51         ` David Edelsohn
1998-01-17 22:30       ` Richard Henderson
1998-01-16  1:51     ` David Edelsohn
1998-01-15 16:30       ` Andrey Slepuhin
1998-01-16 20:09         ` David Edelsohn
1998-01-16 20:09 Andrey Slepuhin
1998-01-17 23:02 ` David Edelsohn
1998-01-19  2:30   ` Andrey Slepuhin
1998-01-19  8:19     ` David Edelsohn
1998-01-19 15:31       ` Andrey Slepuhin
1998-01-19 15:31         ` David Edelsohn
1998-01-20  4:00           ` Andrey Slepuhin
1998-01-20  4:00             ` David Edelsohn
1998-01-20  2:21 Mike Stump
1998-01-19 15:31 ` Andrey Slepuhin
1998-01-20  5:48 Andrey Slepuhin
1998-01-20  9:45 ` David Edelsohn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).