This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: PATCH: invalid IFUNC DW_AT_linkage_name: memmove strstr time


On Thu, 09 Aug 2012 01:26:56 +0200, Roland McGrath wrote:
> > http://sourceware.org/bugzilla/show_bug.cgi?id=14166
> 
> That bug does give enough for me to guess, though it could indeed use an
> explanation of what the real problem is.  (My guess is that for inferior
> calls GDB tries first to look up the name in DWARF info, and thus it finds
> e.g. the "memmove" that is defined as the linkage name for memmove_ifunc,
> and uses that PC as the target based on the entry_pc in the DIE.  It
> doesn't double-check the ELF symbol table entry for the linkage name, and
> so fails to realize that PC is the IFUNC entry point rather than the
> resolved function entry point.)

I agree with everything said above.  Verifying each DWARF symbol also against
ELF symbols would be a needless overhead, GDB has already performance issues.

IMO the DWARF definition DIE of ifuncs was wrong, there should have been some
DW_AT_is_gnu_ifunc.  But according to Uli the gnu-ifunc resolvers were not
interesting enough for debugging to give them valid DWARF.


Thanks,
Jan


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