public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* AIX g++ 3.0.2 Undefined symbol: virtual thunk to...
@ 2001-12-04 12:59 Robert Boehne
  2001-12-04 13:03 ` David Edelsohn
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Boehne @ 2001-12-04 12:59 UTC (permalink / raw)
  To: gcc

Hello,

I've got a bit of a problem here, and I suspect it might be due to
the fact I'm using gcc configured without shared libraries.
I could find no mention of "virtual thunk" (only non-virtual thunk)
in gnats, and I couldnt' find anything to suggest (to me) that
the two problem reports were related.

Any ideas?  What is a "thunk"?

Thanks,

Robert

/bin/sh ../libtool --mode=link g++  -g -O2  -lpthread -o object_test 
object_test.o ../sigc++/libsigc.la
g++ -g -O2 -o .libs/object_test object_test.o  -L../sigc++/.libs -lsigc
-lpthread -Wl,-bnolibpath
-Wl,-blibpath:/icarus/sigc++/ibm43/lib:/usr/lib:/lib
ld: 0711-224 WARNING: Duplicate symbol:
std::_Format_cache<char>::_S_pword_ix
ld: 0711-341 WARNING: Replaced XTY_CM symbol
std::_Format_cache<char>::_S_pword_ix requires an
        alignment more strict than the alignment of the symbol that
replaces it.
ld: 0711-224 WARNING: Duplicate symbol: std::numpunct<char>::id
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
ld: 0711-317 ERROR: Undefined symbol: virtual thunk to
SigC::Object::~Object()
ld: 0711-317 ERROR: Undefined symbol: virtual thunk to
SigC::Object::~Object()
collect2: ld returned 8 exit status           

boreas::/boreas/build302 (78)% gcc -v
Reading specs from
/boreas/gcctest/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0.2/specs
Configured with: /boreas/gcc-3.0.2/configure
--with-gcc-version-trigger=/boreas/gcc-3.0.2/gcc/version.c
--host=powerpc-ibm-aix4.3.3.0 --prefix=/boreas/gcctest --enable-threads
--enable-languages=c,c++ --without-gnu-ld --with-gnu-as
--infodir=/net/InHouse/emacs/20.7/info --enable-static --disable-shared
Thread model: single
gcc version
3.0.2                                                                                                 

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne@ricardo-us.com

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

* Re: AIX g++ 3.0.2 Undefined symbol: virtual thunk to...
  2001-12-04 12:59 AIX g++ 3.0.2 Undefined symbol: virtual thunk to Robert Boehne
@ 2001-12-04 13:03 ` David Edelsohn
  2001-12-06  9:20   ` Robert Boehne
  0 siblings, 1 reply; 5+ messages in thread
From: David Edelsohn @ 2001-12-04 13:03 UTC (permalink / raw)
  To: Robert Boehne; +Cc: gcc

>>>>> Robert Boehne writes:

Robert> I've got a bit of a problem here, and I suspect it might be due to
Robert> the fact I'm using gcc configured without shared libraries.
Robert> I could find no mention of "virtual thunk" (only non-virtual thunk)
Robert> in gnats, and I couldnt' find anything to suggest (to me) that
Robert> the two problem reports were related.

Robert> Any ideas?  What is a "thunk"?

	GCC does not generate thunks for AIX.

David

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

* Re: AIX g++ 3.0.2 Undefined symbol: virtual thunk to...
  2001-12-04 13:03 ` David Edelsohn
@ 2001-12-06  9:20   ` Robert Boehne
  2001-12-06  9:55     ` David Edelsohn
  0 siblings, 1 reply; 5+ messages in thread
From: Robert Boehne @ 2001-12-06  9:20 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

David Edelsohn wrote:
> 
> >>>>> Robert Boehne writes:
> 
> Robert> I've got a bit of a problem here, and I suspect it might be due to
> Robert> the fact I'm using gcc configured without shared libraries.
> Robert> I could find no mention of "virtual thunk" (only non-virtual thunk)
> Robert> in gnats, and I couldnt' find anything to suggest (to me) that
> Robert> the two problem reports were related.
> 
> Robert> Any ideas?  What is a "thunk"?
> 
>         GCC does not generate thunks for AIX.
> 
> David

David:

Now I'm baffled.  If g++ isn't generating them, how do they get
into my object code?  Doing an nm of this library I get 68 lines
that match "thunk".
 nm ./sigc++/.libs/libsigc.a | c++filt | grep thunk
000000001004b668 t .non-virtual thunk to std::iostream::~iostream()
<SNIP>
0000000020010e48 d virtual thunk to std::strstream::~strstream()
0000000020010ca4 d virtual thunk to SigC::Object::~Object()
0000000020010c98 d virtual thunk to
SigC::Object::~Object()                                                                                  

Are you saying that some other compiler is generating these?
My suspicion is that it is related to having a compiler configured
with "--disable-shared --disable-threads" so I'm working on
re-bootstrapping gcc with "--enable-threads=posix --enable-shared".
I'm not sure what a "thunk" is so the link error doesn't help
me much.

Thanks,

Robert


boreas::/icarus/tempsig++/ibm43 (84)% dump -H ./sigc++/.libs/libsigc.a
 
./sigc++/.libs/libsigc.a[libsigc-1.1.so.0]:
 
                        ***Loader Section***
                      Loader Header Information
VERSION#         #SYMtableENT     #RELOCent        LENidSTR
0x00000001       0x000000c1       0x00001053       0x0000008f
 
#IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
0x00000002       0x0000d61c       0x000013ff       0x0000d6ab
 
 
                        ***Import File Strings***
INDEX  PATH                          BASE                MEMBER
0     
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0.2:/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0.2/../../..:/usr/lib:/lib
 
1                                    libc.a              shr.o

boreas::/icarus/tempsig++/ibm43 (85)% g++ -v
Reading specs from
/usr/local/lib/gcc-lib/powerpc-ibm-aix4.3.3.0/3.0.2/specs
Configured with: /boreas/gcc-3.0.2/configure --prefix=/usr/local
--disable-threads --enable-languages=c,c++ --without-gnu-ld
--with-gnu-as --infodir=/net/InHouse/emacs/20.7/info --disable-shared
--enable-static
Thread model: single
gcc version 3.0.2

                                                                                                          
-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne@ricardo-us.com

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

* Re: AIX g++ 3.0.2 Undefined symbol: virtual thunk to...
  2001-12-06  9:20   ` Robert Boehne
@ 2001-12-06  9:55     ` David Edelsohn
  2001-12-06 11:18       ` PR4122 Regression from 2.95 in 3.0.2 (Was: Re: AIX g++ 3.0.2 Undefined symbol: virtual thunk to...) Robert Boehne
  0 siblings, 1 reply; 5+ messages in thread
From: David Edelsohn @ 2001-12-06  9:55 UTC (permalink / raw)
  To: Robert Boehne; +Cc: gcc

>>>>> Robert Boehne writes:

Robert> Now I'm baffled.  If g++ isn't generating them, how do they get
Robert> into my object code?  Doing an nm of this library I get 68 lines
Robert> that match "thunk".
Robert> nm ./sigc++/.libs/libsigc.a | c++filt | grep thunk
Robert> 000000001004b668 t .non-virtual thunk to std::iostream::~iostream()
Robert> <SNIP>
Robert> 0000000020010e48 d virtual thunk to std::strstream::~strstream()
Robert> 0000000020010ca4 d virtual thunk to SigC::Object::~Object()
Robert> 0000000020010c98 d virtual thunk to
Robert> SigC::Object::~Object()                                                                                  

Robert> Are you saying that some other compiler is generating these?
Robert> My suspicion is that it is related to having a compiler configured
Robert> with "--disable-shared --disable-threads" so I'm working on
Robert> re-bootstrapping gcc with "--enable-threads=posix --enable-shared".
Robert> I'm not sure what a "thunk" is so the link error doesn't help
Robert> me much.

	I do not know what a virtual thunk is.

	Thunks are described on many websites.  It is a piece of code to
fix up the "this" pointer for multiple inheritance.

	Maybe some part of GCC is not obeying #ifdef ASM_OUTPUT_MI_THUNK.

David

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

* PR4122 Regression from 2.95 in 3.0.2 (Was: Re: AIX g++ 3.0.2 Undefined  symbol: virtual thunk to...)
  2001-12-06  9:55     ` David Edelsohn
@ 2001-12-06 11:18       ` Robert Boehne
  0 siblings, 0 replies; 5+ messages in thread
From: Robert Boehne @ 2001-12-06 11:18 UTC (permalink / raw)
  To: David Edelsohn; +Cc: gcc

David:

I've looked into this some more and it appears to be a known problem
PR4122, and a regression from 2.95.3, and is not AIX specific.
In my case, libsigc++-1.1.4, the problem does not have the
workaround alluded to in GNATS.
ref:
http://gcc.gnu.org/ml/gcc-bugs/2001-08/msg00919.html

I have run into this with other code as well, I hate to beg,
but could a fix for this be considered for 3.0.3?

Thanks,

Robert


David Edelsohn wrote:
> 
> >>>>> Robert Boehne writes:
> 
> Robert> Now I'm baffled.  If g++ isn't generating them, how do they get
> Robert> into my object code?  Doing an nm of this library I get 68 lines
> Robert> that match "thunk".
> Robert> nm ./sigc++/.libs/libsigc.a | c++filt | grep thunk
> Robert> 000000001004b668 t .non-virtual thunk to std::iostream::~iostream()
> Robert> <SNIP>
> Robert> 0000000020010e48 d virtual thunk to std::strstream::~strstream()
> Robert> 0000000020010ca4 d virtual thunk to SigC::Object::~Object()
> Robert> 0000000020010c98 d virtual thunk to
> Robert> SigC::Object::~Object()
> 
> Robert> Are you saying that some other compiler is generating these?
> Robert> My suspicion is that it is related to having a compiler configured
> Robert> with "--disable-shared --disable-threads" so I'm working on
> Robert> re-bootstrapping gcc with "--enable-threads=posix --enable-shared".
> Robert> I'm not sure what a "thunk" is so the link error doesn't help
> Robert> me much.
> 
>         I do not know what a virtual thunk is.
> 
>         Thunks are described on many websites.  It is a piece of code to
> fix up the "this" pointer for multiple inheritance.
> 
>         Maybe some part of GCC is not obeying #ifdef ASM_OUTPUT_MI_THUNK.
> 
> David

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  rboehne@ricardo-us.com

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

end of thread, other threads:[~2001-12-06 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-04 12:59 AIX g++ 3.0.2 Undefined symbol: virtual thunk to Robert Boehne
2001-12-04 13:03 ` David Edelsohn
2001-12-06  9:20   ` Robert Boehne
2001-12-06  9:55     ` David Edelsohn
2001-12-06 11:18       ` PR4122 Regression from 2.95 in 3.0.2 (Was: Re: AIX g++ 3.0.2 Undefined symbol: virtual thunk to...) Robert Boehne

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