From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23192 invoked by alias); 29 Mar 2009 17:47:19 -0000 Received: (qmail 22110 invoked by uid 48); 29 Mar 2009 17:47:08 -0000 Date: Sun, 29 Mar 2009 17:47:00 -0000 Message-ID: <20090329174708.22109.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/39578] Linkage broken for dllimport vtables In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dave dot korn dot cygwin at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-03/txt/msg02086.txt.bz2 ------- Comment #1 from dave dot korn dot cygwin at gmail dot com 2009-03-29 17:47 ------- For Cygwin, we just recently made --enable-auto-import the default in CVS binutils. Now that we're moving to shared library runtimes throughout it made sense. However, I think this is a real bug, as it doesn't happen on 4.3.2; we get a direct undefined reference to the import symbol in the object file: $ g++ -g -o vttest.exe vttest.cpp libvttest.dll.a --save-temps admin@ubik /tmp/vttest $ nm vttest.o 00000000 b .bss 00000000 d .data 00000000 N .debug_abbrev 00000000 N .debug_aranges 00000000 N .debug_frame 00000000 N .debug_info 00000000 N .debug_line 00000000 N .debug_loc 00000000 N .debug_pubnames 00000000 N .debug_ranges 00000000 N .debug_str 00000000 d .eh_frame 00000000 t .text 00000000 t .text$_ZN10TestObjectC1Ev 00000000 T __ZN10TestObjectC1Ev U ___gxx_personality_v0 U ___main U __imp___ZN10TestObject8VirtFuncEv U __imp___ZTV10TestObject 00000000 T _main admin@ubik /tmp/vttest $ My earlier build of 4.3.3 with the patch for PR36654 reverted does the same thing. However, as soon as I reapplied the patch and rebuilt cc1plus, I got this output: /tmp/vttest $ nm vttest.o libvtt 00000000 b .bss 00000000 d .data 00000000 N .debug_abbrev 00000000 N .debug_aranges 00000000 N .debug_frame 00000000 N .debug_info 00000000 N .debug_line 00000000 N .debug_loc 00000000 N .debug_pubnames 00000000 N .debug_ranges 00000000 N .debug_str 00000000 d .eh_frame 00000000 t .text 00000000 t .text$_ZN10TestObjectC1Ev 00000000 T __ZN10TestObjectC1Ev U __ZTV10TestObject U ___gxx_personality_v0 U ___main U __imp___ZN10TestObject8VirtFuncEv 00000000 T _main /tmp/vttest $ So I think that confirms it. -- dave dot korn dot cygwin at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dave dot korn dot cygwin at | |gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39578