This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: static data member problem
- To: Theodore Papadopoulo <Theodore dot Papadopoulo at sophia dot inria dot fr>
- Subject: Re: static data member problem
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 24 Sep 1998 11:22:08 +-300
- Cc: Jason Merrill <jason at cygnus dot com>, egcs-bugs at cygnus dot com
- References: <199809241131.NAA04035@mururoa.inria.fr>
Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> writes:
> So the beginner's question is: is it possible (well it's
> always possible, I mean is it a good solution) to make -frepo
> used by default (at configure time) for those architectures ??
It certainly is, but it won't solve all the problems. The first on
that comes to my mind is that -frepo will only work if you compile and
link in two separate steps. Moreover, it won't work for libraries.
My idea was more on the line of emulating weak definitions by
generating code for them as if they were members of anonymous
namespaces. Then, at link time, collect2 could extract the required
pieces of code from the object file, rename the symbols so as to match
their original names, then link everything together.
I'm not sure it is possible to extract information like that from
object files, though. Another solution would be to write the assembly
code (text) of the ``weak'' definitions into the object file, in a way
that collect2 could extract it, generate a single assembly file
containing all the weak definitions, assemble it and link it together
with the other object files.
Is any of these approaches possible?
--
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil