X-Spam-Check-By: sourceware.org Date: Sat, 3 Feb 2007 10:12:46 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: dllimport and __asm__("_alias" ) Message-ID: <20070203151246.GA17716@trixie.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <000001c7477e$aeb57f10$df6d65da AT anykey> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000001c7477e$aeb57f10$df6d65da@anykey> User-Agent: Mutt/1.5.11 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Sat, Feb 03, 2007 at 11:33:00PM +1300, Danny Smith wrote: >That is, to do the right thing, we would need to: > >extern __declspec(dllimport) void foo (void) __asm__("__imp__bar"); >void call_bar(void) >{ foo(); } > >to get >_call_bar: > pushl %ebp > movl __imp__bar, %ecx > movl %esp, %ebp > popl %ebp > jmp *%ecx > >Any comments, before I submit the patch to gcc? > >Should gcc warn if the asmspec of a dllimport alias lacks the >"__imp__". I agree that it shouldn't add the __imp_ automatically. I don't know if a warning is necessary, though. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/