This is the mail archive of the
mailing list for the GCC project.
Re: duplicate symbols and -frepo on AIX 4.2
- To: law at cygnus dot com
- Subject: Re: duplicate symbols and -frepo on AIX 4.2
- From: Andrey Slepuhin <pooh at msu dot net>
- Date: Sun, 29 Mar 1998 00:35:57 +0300 (MSK)
- Cc: David Edelsohn <dje at watson dot ibm dot com>, egcs-bugs at cygnus dot com, (Daniel Supernaw-Issen) <dsupern at arash dot amd dot com>
- Organization: Moscow State University Network (MSUnet)
On 28-Mar-98 Jeffrey A Law wrote:
> In message <XFMail.email@example.com>you write:
> > The problem is because tlink part of collect2 doesn't recognize AIX
> > diagnostic.
> Do we still have this problem? (is -frepo even useful on AIX?).
Yes. It seems -frepo is the only way to avoid duplicated templates
on AIX automatically.
> > You can try a small patch (attached) but other systems
> > (e.g. FreeBSD) have similar problems.
> Yes. And putting lots of system specific conditionals in tlink.c
> isn't the right way to fix the problem :-)
Agree. So I don't declare my patch as a solution :-)
> > IMHO, the best way to solve
> > such kind of problems is to use regular expressions to define
> > linker diagnostic patterns. I already wrote about this some time ago,
> > but didn't saw any responce...
> I don't remember this, but it's quite likely it got lost in much
> of the other aix/collect mail that went by a couple months ago.
> Using regexps is probably the best solution. Did you have a patch
> for that or were you just suggesting it as a potential solution?
I don't have such patch. It seems that whole egcs stuff doesn't use
regexps at all, so I'm indecisive to use them.
> If we don't use regexps, then I would recommend we define some
> sort of target macro to deal with this problem.
May be, or we can try to implement some simple patterns to deal
with linker messages (but anyway we'll need some sort of macros
to define such patterns). I can try to implement tlink part of
a patch, but sorry, I'm confused with configuration issues.
What I want to discuss again is a problem with multiple instances
of typeinfo nodes when using shared libraries on AIX. This cause
broken rtti and exception handling. The problem is because current
rtti implementation compares typeinfo nodes by address (Ok, this is fast),
so we'll need unique instance for each typeinfo node. Jason said
that we probably need to compare typeinfo node by value in case
of AIX, but it is slow and as I undestand still not implemented
(I understand that there is no big interest to implement ineffective
methods, and of course it's not a primary task for egcs team :-)).
What if we try to avoid duplicated typeinfo nodes using -frepo
options? Typeinfo nodes have some aspects similar to templates,
and both are implemented as weak symbols on systems that support
them. In general: weak symbols are often used if we want to avoid
multiple instances automatically; can we use -frepo option for all
such cases on systems that do not support weak symbols?