bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/15983] New: Add support for emitting symbol table for PLT entrie


From: vijunag at gmail dot com
Subject: [Bug ld/15983] New: Add support for emitting symbol table for PLT entries related to STT_GNU_IFUNC symbol in a static binary
Date: Fri, 27 Sep 2013 15:29:19 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=15983

            Bug ID: 15983
           Summary: Add support for emitting symbol table for PLT entries
                    related to STT_GNU_IFUNC symbol in a static binary
           Product: binutils
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ld
          Assignee: unassigned at sourceware dot org
          Reporter: vijunag at gmail dot com
                CC: vijunag at gmail dot com

The GNU ld seems not to be emitting symbol table information for PLT entries
related to STT_GNU_IFUNC symbols. A debugger would find itself confused when
the program jumps to PLT in order to execute the gnu-indirect-function. 

objdump -d output of dynamic and static binary.

Dynamic executable:

000694d0 <address@hidden>:
   694d0:       ff 25 40 bd 78 0f       jmp    *0xf78bd40
   694d6:       68 b0 02 00 00          push   $0x2b0
   694db:       e9 80 fa ff ff          jmp    68f60 <_init+0x38>

000694e0 <address@hidden>:
   694e0:       ff 25 44 bd 78 0f       jmp    *0xf78bd44
   694e6:       68 b8 02 00 00          push   $0x2b8
   694eb:       e9 70 fa ff ff          jmp    68f60 <_init+0x38>

000694f0 <address@hidden>:
   694f0:       ff 25 48 bd 78 0f       jmp    *0xf78bd48
   694f6:       68 c0 02 00 00          push   $0x2c0
   694fb:       e9 60 fa ff ff          jmp    68f60 <_init+0x38>


Static executable:

08048250 <.plt>:
 8048250:       ff 25 14 87 8f 17       jmp    *0x178f8714
 8048256:       68 00 00 00 00          push   $0x0
 804825b:       e9 00 00 00 00          jmp    8048260 <__rel_iplt_end+0x44>
 8048260:       ff 25 18 87 8f 17       jmp    *0x178f8718
 8048266:       68 00 00 00 00          push   $0x0
 804826b:       e9 00 00 00 00          jmp    8048270 <__rel_iplt_end+0x54>
 8048270:       ff 25 1c 87 8f 17       jmp    *0x178f871c
 8048276:       68 00 00 00 00          push   $0x0
 804827b:       e9 00 00 00 00          jmp    8048280 <__rel_iplt_end+0x64>
 8048280:       ff 25 20 87 8f 17       jmp    *0x178f8720
 8048286:       68 00 00 00 00          push   $0x0
 804828b:       e9 00 00 00 00          jmp    8048290 <__rel_iplt_end+0x74>
 8048290:       ff 25 24 87 8f 17       jmp    *0x178f8724

gdb is unable to find the bounds of the current function when the program jumps
to PLT.

(gdb) n
273     argv0short = strrchr(argv[0], '/');
(gdb) n
0x08048430 in ?? ()
(gdb) n
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]