public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* _ZTV vs _ZTI
@ 2007-03-26 23:49 viet
  2007-03-27  1:17 ` Ian Lance Taylor
  2007-03-27 11:43 ` Andrew Haley
  0 siblings, 2 replies; 3+ messages in thread
From: viet @ 2007-03-26 23:49 UTC (permalink / raw)
  To: gcc-help

Hi,

I have an archive file, when I do a nm on it, I can see.

00000000 V _ZTV13VLH_Container

the compile option to create the objects for the archive (.a) is

gcc -c -Wno-ctor-dtor-privacy  -fno-rtti -MMD -pthread -Wno-deprecated
-Wall -O2

I have an .so that link with the above archive, when I do an nm on it, I
can see:
         U _ZTI13VLH_Container

the compile option to creates objects for the .so is

g++ -pipe -Wall -fPIC -rdynamic -g

I'm guessing that the problem for the undefined symbol is a compile
option. What is the difference between _ZTV and _ZTI?

When linking my so, I put the archive at the end. Any idea?

Regards,

VLH

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

* Re: _ZTV vs _ZTI
  2007-03-26 23:49 _ZTV vs _ZTI viet
@ 2007-03-27  1:17 ` Ian Lance Taylor
  2007-03-27 11:43 ` Andrew Haley
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2007-03-27  1:17 UTC (permalink / raw)
  To: viet; +Cc: gcc-help

viet@horslimites.org writes:

> I'm guessing that the problem for the undefined symbol is a compile
> option. What is the difference between _ZTV and _ZTI?

_ZTV is a virtual table.  _ZTI is a typeinfo table (for RTTI).

I don't know why you are seeing the undefined symbol in the .so.

Ian

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

* Re: _ZTV vs _ZTI
  2007-03-26 23:49 _ZTV vs _ZTI viet
  2007-03-27  1:17 ` Ian Lance Taylor
@ 2007-03-27 11:43 ` Andrew Haley
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Haley @ 2007-03-27 11:43 UTC (permalink / raw)
  Cc: gcc-help

viet@horslimites.org writes:
 > 
 > I have an archive file, when I do a nm on it, I can see.
 > 
 > 00000000 V _ZTV13VLH_Container

vtable for VLH_Container

 > the compile option to create the objects for the archive (.a) is
 > 
 > gcc -c -Wno-ctor-dtor-privacy  -fno-rtti -MMD -pthread -Wno-deprecated
 > -Wall -O2
 > 
 > I have an .so that link with the above archive, when I do an nm on it, I
 > can see:
 >          U _ZTI13VLH_Container

typeinfo for VLH_Container

 > the compile option to creates objects for the .so is
 > 
 > g++ -pipe -Wall -fPIC -rdynamic -g
 > 
 > I'm guessing that the problem for the undefined symbol is a compile
 > option. What is the difference between _ZTV and _ZTI?

They're totally different things.

Andrew.

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

end of thread, other threads:[~2007-03-27  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 23:49 _ZTV vs _ZTI viet
2007-03-27  1:17 ` Ian Lance Taylor
2007-03-27 11:43 ` Andrew Haley

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).