public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Gerhard Wiesinger <lists@wiesinger.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: Andreas Schwab <schwab@suse.de>,
	binutils@sources.redhat.com, gcc-help@gcc.gnu.org
Subject: Re: gcc and -fPIC
Date: Sun, 17 Oct 2004 18:57:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.61.0410172051060.13547@bbs.intern> (raw)
In-Reply-To: <20041016151728.GA5278@nevyn.them.org>



On Sat, 16 Oct 2004, Daniel Jacobowitz wrote:

> On Sat, Oct 16, 2004 at 02:09:24PM +0200, Andreas Schwab wrote:
>> Gerhard Wiesinger <lists@wiesinger.com> writes:
>>
>>> BTW: Is it possible to see the dynamic symbols in the disassembly? I don't
>>> see the call to operator delete[](void*) at location 8048592.
>>
>> Difficult, because the PLT entries have no symbols attached to them.
>> There is no information about which PLT entry belongs to which function.
>
> There's some code in HEAD to do this, written by Jakub.
>

Ok, I tried the HEAD version:
DYNAMIC SYMBOL TABLE:
080483d0      DF *UND*  0000002a  GLIBCPP_3.2 operator delete(void*)
080483e0      DF *UND*  000004d1  CXXABI_1.2  __gxx_personality_v0
080483f0      DF *UND*  000000f3  GLIBC_2.0   __libc_start_main
080486c0 g    DO .rodata        00000004  Base        _IO_stdin_used
08048400      DF *UND*  00000039  GLIBCPP_3.2 operator new[](unsigned int)
08048410      DF *UND*  00000026  GLIBCPP_3.2 operator delete[](void*)
00000000  w   D  *UND*  00000000              _Jv_RegisterClasses
08048420      DF *UND*  000000a3  GLIBCPP_3.2 operator new(unsigned int)
00000000  w   D  *UND*  00000000              __gmon_start__

08048410 <_ZdaPv@plt>:
  8048410:       ff 25 3c 98 04 08       jmp    *0x804983c
  8048416:       68 20 00 00 00          push   $0x20
  804841b:       e9 a0 ff ff ff          jmp    80483c0 <_init+0x18>


         delete x;
  8048578:       83 ec 0c                sub    $0xc,%esp
  804857b:       ff 75 f4                pushl  0xfffffff4(%ebp)
  804857e:       e8 4d fe ff ff          call   80483d0 <_ZdlPv@plt>
  8048583:       83 c4 10                add    $0x10,%esp
         delete [] xarray;
  8048586:       83 7d f0 00             cmpl   $0x0,0xfffffff0(%ebp)
  804858a:       74 0e                   je     804859a <main+0xba>
  804858c:       83 ec 0c                sub    $0xc,%esp
  804858f:       ff 75 f0                pushl  0xfffffff0(%ebp)
  8048592:       e8 79 fe ff ff          call   8048410 <_ZdaPv@plt>
  8048597:       83 c4 10                add    $0x10,%esp
}


I got some symbol output, but not the expected one.

But it shouldn't be to difficult to implement because the DYNAMIC SYMBOL 
table above has already the correct symbol.

Ciao,
Gerhard

  reply	other threads:[~2004-10-17 18:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-15 17:08 Gerhard Wiesinger
2004-10-15 17:54 ` Dave Korn
2004-10-15 19:55 ` Andreas Schwab
2004-10-16  6:06   ` Gerhard Wiesinger
2004-10-16 12:09     ` Andreas Schwab
2004-10-16 15:17       ` Daniel Jacobowitz
2004-10-17 18:57         ` Gerhard Wiesinger [this message]
2004-10-17 19:31           ` Daniel Jacobowitz
2004-10-18  5:17             ` Gerhard Wiesinger
2004-10-15 18:26 bserdar
2004-10-15 18:46 ` Dave Korn
2004-10-15 18:51 ` Gerhard Wiesinger
2004-10-15 19:11   ` Jeffrey A Law
2004-10-15 19:16     ` Gerhard Wiesinger
2004-10-15 18:58 bserdar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.61.0410172051060.13547@bbs.intern \
    --to=lists@wiesinger.com \
    --cc=binutils@sources.redhat.com \
    --cc=drow@false.org \
    --cc=gcc-help@gcc.gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).