[Bug ld/15983] New: Add support for emitting symbol table for PLT entries related to STT_GNU_IFUNC symbol in a static binary

2013-09-27 Thread vijunag at gmail dot com
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 :
   694d0:   ff 25 40 bd 78 0f   jmp*0xf78bd40
   694d6:   68 b0 02 00 00  push   $0x2b0
   694db:   e9 80 fa ff ff  jmp68f60 <_init+0x38>

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

000694f0 :
   694f0:   ff 25 48 bd 78 0f   jmp*0xf78bd48
   694f6:   68 c0 02 00 00  push   $0x2c0
   694fb:   e9 60 fa ff ff  jmp68f60 <_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  jmp8048260 <__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  jmp8048270 <__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  jmp8048280 <__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  jmp8048290 <__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.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/15983] Add support for emitting symbol table for PLT entries related to STT_GNU_IFUNC symbol in a static binary

2013-09-27 Thread vijunag at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=15983

Vijay Nag  changed:

   What|Removed |Added

 Target||i686-pc-linux-gnu
   Host||i686-pc-linux-gnu
  Build||amd64-pc-linux-gnu

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/15984] New: Segfault when using static __thread function variables with intel compiler

2013-09-27 Thread richardg.work at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15984

Bug ID: 15984
   Summary: Segfault when using static __thread function variables
with intel compiler
   Product: binutils
   Version: 2.23
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
  Assignee: ian at airs dot com
  Reporter: richardg.work at gmail dot com
CC: ccoutant at google dot com

static __thread function variables cause Segfault at runtime when compiled with
the intel compiler.

Build command :
icc14 goldcrash.cpp -o goldcrash -B  && ./goldcrash

(replace  with the installation of binutils 2.23.2

goldcrash.cpp :

int main(int argc, const char **argv)
{
 static __thread int lastID = -1;
 lastId = 0;
 return 0;
}

Also reported to intel: http://software.intel.com/en-us/forums/topic/475114

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/15984] Segfault when using static __thread function variables with intel compiler

2013-09-27 Thread ccoutant at google dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15984

Cary Coutant  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|ian at airs dot com|ccoutant at google dot 
com

--- Comment #1 from Cary Coutant  ---
Can you attach a .o file, please?

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/15984] Segfault when using static __thread function variables with intel compiler

2013-09-27 Thread richardg.work at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15984

--- Comment #2 from Richard Geary  ---
Created attachment 7219
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7219&action=edit
output of icc14 goldcrash.cpp -o goldcrash.o -c -g -O0

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

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils