This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc and -fPIC




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]