delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/19/14:17:36

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Rolf Campbell <Endlisnis AT mailc DOT net>
Subject: Re: objdump : inaccurate demangling for foo(char* const)
Date: Fri, 19 Sep 2003 14:17:08 -0400
Lines: 104
Message-ID: <bkfh75$v8o$1@sea.gmane.org>
References: <bkdtn1$597$2 AT sea DOT gmane DOT org>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030723 Thunderbird/0.1
X-Accept-Language: en-us, en
In-Reply-To: <bkdtn1$597$2@sea.gmane.org>

foo(char* const) is no different from foo(char*), from the perspective 
of linking/overloading.

Did you mean foo(char const *)?

Alex Vinokur wrote:
> ==========================================
> Windows 2000 Professional
> CYGWIN_NT-5.0 1.5.4(0.94/3/2)
> GNU gcc version 3.2 20020927 (prerelease)
> GNU objdump 2.14.90 20030901
> ==========================================
> 
> 
> It seems that objdump inaccurately demangles foo(char* const).
>   Low-level symbol name of foo(char* const) is valid : __Z3fooPc
>   But user-level symbol name obtained after demangling is inaccurate : foo(char*).
> 
> 
> 
> ====== C++ code : BEGIN ======
> // File t.cpp
> 
> void foo3 (char*) {}
> 
> ====== C++ code : END ========
> 
> 
> 
> ====== Compilation : BEGIN ======
> 
> $ g++ -c t.cpp
> 
> ====== Compilation : END ========
> 
> 
> 
> ====== objdump : BEGIN ======
> 
> $ objdump -d t.o
> 
> t.o:     file format pe-i386
> 
> Disassembly of section .text:
> 
> 00000000 <__Z3fooPc>:    // OK
>    0: 55                    push   %ebp
>    1: 89 e5                 mov    %esp,%ebp
>    3: 5d                    pop    %ebp
>    4: c3                    ret
>    5: 90                    nop
>    6: 90                    nop
>    7: 90                    nop
>    8: 90                    nop
>    9: 90                    nop
>    a: 90                    nop
>    b: 90                    nop
>    c: 90                    nop
>    d: 90                    nop
>    e: 90                    nop
>    f: 90                    nop
> 
> 
> 
> 
> 
> $ objdump -Cd t.o
> 
> 
> t.o:     file format pe-i386
> 
> Disassembly of section .text:
> 
> 00000000 <foo(char*)>:    // Must be foo(char* const)
>    0: 55                    push   %ebp
>    1: 89 e5                 mov    %esp,%ebp
>    3: 5d                    pop    %ebp
>    4: c3                    ret
>    5: 90                    nop
>    6: 90                    nop
>    7: 90                    nop
>    8: 90                    nop
>    9: 90                    nop
>    a: 90                    nop
>    b: 90                    nop
>    c: 90                    nop
>    d: 90                    nop
>    e: 90                    nop
>    f: 90                    nop
> 
> ====== objdump : END ========
> 
> --
>    =====================================
>    Alex Vinokur
>      mailto:alexvn AT connect DOT to
>      http://mathforum.org/library/view/10978.html
>    =====================================
> 
> 
> 
> 
> 



--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019