public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time
@ 2012-05-24 19:56 jan.kratochvil at redhat dot com
  2012-08-08 13:55 ` [Bug libc/14166] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-05-24 19:56 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14166

             Bug #: 14166
           Summary: invalid IFUNC DW_AT_linkage_name: memmove strstr time
           Product: glibc
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jan.kratochvil@redhat.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified
              Host: x86_64-unknown-linux-gnu


Created attachment 6422
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6422
Broken fix attempt.

$ ./gdb /lib64/libc.so.6
GNU gdb (GDB) 7.4.50.20120523-cvs
(gdb) p memmove
$1 = {<text gnu-indirect-function variable, no debug info>} 0x88a70 <memmove>
(gdb) p memmove
$2 = {void *(void)} 0x88a70 <memmove>

DWARF has no way how to mark a function as IFUNC.  Only ELF has a way.
No DWARF DIE definition must use ELF IFUNC symbol names as GDB prefers DWARF
symbols more than ELF symbols.

These DWARF DW_AT_linkage_name symbols are marked in ELF as IFUNC:
  __GI___strcasecmp __GI_time __gettimeofday __memmove_chk __sched_cpucount
  __strcasestr memmove strstr time

Out of those only these are of concern to users:
  memmove strstr time

 <0><18c0c5>: Abbrev Number: 1 (DW_TAG_compile_unit)
    <18c0cb>   DW_AT_name        : ../sysdeps/x86_64/multiarch/memmove.c
 <1><18c3f8>: Abbrev Number: 27 (DW_TAG_subprogram)
    <18c3f9>   DW_AT_external    : 1
    <18c3f9>   DW_AT_name        : memmove_ifunc
    <18c3fd>   DW_AT_decl_file   : 2
    <18c3fe>   DW_AT_decl_line   : 46
    <18c3ff>   DW_AT_linkage_name: memmove
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    <18c403>   DW_AT_prototyped  : 1
    <18c403>   DW_AT_type        : <0x18c126>
    <18c407>   DW_AT_low_pc      : 0x88a70
    <18c40f>   DW_AT_high_pc     : 0x88ab7
    <18c417>   DW_AT_frame_base  : 1 byte block: 9c     (DW_OP_call_frame_cfa)
    <18c419>   DW_AT_GNU_all_call_sites: 1
    <18c419>   DW_AT_sibling     : <0x18c43a>

libc_ifunc (memmove,
            ^^^^^^^
Other uses of libc_ifunc are for example:
libc_ifunc (__strcasestr,

Attached broken fix attempt fails to build:
../sysdeps/x86_64/multiarch/memmove.c: In function '__memmove_ifunc':
../sysdeps/x86_64/multiarch/memmove.c:42:1: error: '__memmove' undeclared
(first use in this function)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/14166] invalid IFUNC DW_AT_linkage_name: memmove strstr time
  2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
@ 2012-08-08 13:55 ` hjl.tools at gmail dot com
  2012-08-08 15:53 ` hjl.tools at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-08-08 13:55 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14166

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl.tools at gmail dot com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/14166] invalid IFUNC DW_AT_linkage_name: memmove strstr time
  2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
  2012-08-08 13:55 ` [Bug libc/14166] " hjl.tools at gmail dot com
@ 2012-08-08 15:53 ` hjl.tools at gmail dot com
  2012-08-08 16:09 ` jan.kratochvil at redhat dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-08-08 15:53 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14166

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2012-08-08 15:53:22 UTC ---
What should debug info look like? How will debug info be used by GDB?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/14166] invalid IFUNC DW_AT_linkage_name: memmove strstr time
  2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
  2012-08-08 13:55 ` [Bug libc/14166] " hjl.tools at gmail dot com
  2012-08-08 15:53 ` hjl.tools at gmail dot com
@ 2012-08-08 16:09 ` jan.kratochvil at redhat dot com
  2012-08-08 17:52 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-08-08 16:09 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14166

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com

--- Comment #2 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-08-08 16:09:35 UTC ---
There should be no DWARF for memmove.
GDB should see just the ELF symbol (which is IFUNC).

There can be some DWARF for memmove but if it is it must have different name,
such as __GI_memmove or whatever.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/14166] invalid IFUNC DW_AT_linkage_name: memmove strstr time
  2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
                   ` (2 preceding siblings ...)
  2012-08-08 16:09 ` jan.kratochvil at redhat dot com
@ 2012-08-08 17:52 ` hjl.tools at gmail dot com
  2012-08-08 21:55 ` jan.kratochvil at redhat dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2012-08-08 17:52 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14166

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #6422|0                           |1
        is obsolete|                            |

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2012-08-08 17:52:14 UTC ---
Created attachment 6569
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6569
A patch

Please try this and let me know if it fixes your problem.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/14166] invalid IFUNC DW_AT_linkage_name: memmove strstr time
  2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
                   ` (3 preceding siblings ...)
  2012-08-08 17:52 ` hjl.tools at gmail dot com
@ 2012-08-08 21:55 ` jan.kratochvil at redhat dot com
  2012-08-10  6:01 ` jan.kratochvil at redhat dot com
  2014-06-19 14:37 ` fweimer at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-08-08 21:55 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14166

--- Comment #4 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-08-08 21:55:06 UTC ---
It looks perfect during all the tests I made, thanks!

The Fedora GDB workaround is no longer needed:
http://pkgs.fedoraproject.org/cgit/gdb.git/tree/gdb-glibc-strstr-workaround.patch

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/14166] invalid IFUNC DW_AT_linkage_name: memmove strstr time
  2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
                   ` (4 preceding siblings ...)
  2012-08-08 21:55 ` jan.kratochvil at redhat dot com
@ 2012-08-10  6:01 ` jan.kratochvil at redhat dot com
  2014-06-19 14:37 ` fweimer at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-08-10  6:01 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14166

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
         AssignedTo|unassigned at sourceware    |hjl.tools at gmail dot com
                   |dot org                     |

--- Comment #5 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-08-10 06:01:04 UTC ---
commit f85fa27058eb7d4b56b8deaf885064cf8d730f68
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Aug 9 16:04:37 2012 -0700

    Avoid DWARF definition DIE on ifunc symbols

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug libc/14166] invalid IFUNC DW_AT_linkage_name: memmove strstr time
  2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
                   ` (5 preceding siblings ...)
  2012-08-10  6:01 ` jan.kratochvil at redhat dot com
@ 2014-06-19 14:37 ` fweimer at redhat dot com
  6 siblings, 0 replies; 8+ messages in thread
From: fweimer at redhat dot com @ 2014-06-19 14:37 UTC (permalink / raw)
  To: glibc-bugs

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

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-06-19 14:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-24 19:56 [Bug libc/14166] New: invalid IFUNC DW_AT_linkage_name: memmove strstr time jan.kratochvil at redhat dot com
2012-08-08 13:55 ` [Bug libc/14166] " hjl.tools at gmail dot com
2012-08-08 15:53 ` hjl.tools at gmail dot com
2012-08-08 16:09 ` jan.kratochvil at redhat dot com
2012-08-08 17:52 ` hjl.tools at gmail dot com
2012-08-08 21:55 ` jan.kratochvil at redhat dot com
2012-08-10  6:01 ` jan.kratochvil at redhat dot com
2014-06-19 14:37 ` fweimer at redhat dot com

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).