public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* Re: g++ unref symbols
[not found] <14728.14999.948376.245409@gargle.gargle.HOWL>
@ 2000-08-02 16:15 ` Alexandre Oliva
[not found] ` <14729.2825.659312.264843@gargle.gargle.HOWL>
0 siblings, 1 reply; 3+ messages in thread
From: Alexandre Oliva @ 2000-08-02 16:15 UTC (permalink / raw)
To: Petr Ovchenkov; +Cc: gcc-bugs
On Aug 2, 2000, Petr Ovchenkov <ptr@ParaGraph.Ru> wrote:
> Compiler specs (indeed problem exist on all gcc compilers since
> 2.95.2, don't now about earlier versions):
You'll see somewhere in the docs that GCC emits out-of-line copies of
every inline member-function of a class in the translation unit in
which the first non-inline non-abstract virtual member-function is
defined, if there is one. This is a valid optimization because every
non-abstract virtual member-function must be defined.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: g++ unref symbols
[not found] ` <or4s52n2u2.fsf@guarana.lsd.ic.unicamp.br>
@ 2000-08-03 2:40 ` Petr Ovchenkov
2000-08-03 7:17 ` Jeffrey A Law
1 sibling, 0 replies; 3+ messages in thread
From: Petr Ovchenkov @ 2000-08-03 2:40 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: gcc-bugs
Alexandre Oliva writes:
> On Aug 3, 2000, Petr Ovchenkov <ptr@ParaGraph.Ru> wrote:
>
> > That's was 2.95.2. For later snapshots (mmm, at least since 20000530)
> > for A::A scope instead GLOBAL will be LOCAL (on HP)
>
> I see. AFAIK, WEAK symbols are now supported and used on HP. Maybe
> they just show up as `t' symbols? Or maybe it is indeed some new bug?
I never see WEAK symbols on HP.
c360> uname -a
HP-UX c360 B.11.00 A 9000/785 2002760784 two-user license
And due to native ld fails link when libraries compiled any gcc after
2.95.2, I think that's 't' isn't designate WEAK (I work with GAS).
>
> So, summarizing to the list the discussion we've had in private,
> given:
>
> h.h:
> struct A {
> A() {}
> virtual void f();
> };
>
> x.cc:
> #include "h.h"
> void A::f() {}
>
> y.cc:
> #include "h.h"
> A a;
>
> if you compile x.cc and y.cc without optimization, linking fails
One another issue should be payed attention:
virtual table (and type_info) of A class has local scope, so it still
be unresolved on linkage stage.
c360> c++ -fPIC -shared -o libA.sl -c lib.cc
c360> nm -C libA.sl
00000000 t $CODE$
40000018 d L$C0000
00000000 t A::A(void)
U __rtti_user
00000000 t A type_info function
~~~~~~~~~~~~~~~~~~~~~~
00000008 C A type_info node
40000000 d A virtual table
~~~~~~~~~~~~~~~~~
00000000 t gcc2_compiled.
00000000 T A::qq(void)
> because the constructor is defined as local in x.o and not defined at
> all in y. Is that correct?
Yes. That's what I want to say. Thanks.
- Petr Ovchenkov
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: g++ unref symbols
[not found] ` <or4s52n2u2.fsf@guarana.lsd.ic.unicamp.br>
2000-08-03 2:40 ` Petr Ovchenkov
@ 2000-08-03 7:17 ` Jeffrey A Law
1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 2000-08-03 7:17 UTC (permalink / raw)
To: Alexandre Oliva; +Cc: Petr Ovchenkov, gcc-bugs
In message < or4s52n2u2.fsf@guarana.lsd.ic.unicamp.br >you write:
> On Aug 3, 2000, Petr Ovchenkov <ptr@ParaGraph.Ru> wrote:
>
> > That's was 2.95.2. For later snapshots (mmm, at least since 20000530)
> > for A::A scope instead GLOBAL will be LOCAL (on HP)
>
> I see. AFAIK, WEAK symbols are now supported and used on HP. Maybe
> they just show up as `t' symbols? Or maybe it is indeed some new bug?
You must have a recent binutils snapshot to get the right behavior from
nm/objdump to detect weak symbols. They use 'W' to denote a weak symbol.
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2000-08-03 7:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <14728.14999.948376.245409@gargle.gargle.HOWL>
2000-08-02 16:15 ` g++ unref symbols Alexandre Oliva
[not found] ` <14729.2825.659312.264843@gargle.gargle.HOWL>
[not found] ` <orpunqn5pr.fsf@guarana.lsd.ic.unicamp.br>
[not found] ` <14729.10392.166467.164794@gargle.gargle.HOWL>
[not found] ` <ord7jqn44n.fsf@guarana.lsd.ic.unicamp.br>
[not found] ` <14729.12140.47292.22071@gargle.gargle.HOWL>
[not found] ` <or4s52n2u2.fsf@guarana.lsd.ic.unicamp.br>
2000-08-03 2:40 ` Petr Ovchenkov
2000-08-03 7:17 ` Jeffrey A Law
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).