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


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

Understood.

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

No such DWARF feature would help today anyway, since the compiler generates
the DWARF info but doesn't know that we're defining IFUNC symbols.  I think
the idea of a DWARF extension makes sense, though there may be a better way
to encode it (perhaps a DW_AT_calling_convention with a new DW_CC_GNU_ifunc
code).  I think it's worthwhile discussing that with the DWARF committee
and compiler folks.  

But there's no point in having that until we have compiler support for
IFUNC directly, i.e. __attribute__ ((ifunc)) or the like so that you can
define IFUNC resolvers in C without resorting to using asm to emit .type
directives.  The best feature I can think of is __attribute__ ((ifunc
("name"))) to set the assembly name to "name" (like asm("name") but with a
better syntax) and to use %gnu_indirect_function rather than %func in the
.type directive.  Ideally that would also have the effect of making the
compiler realize that the signature of the IFUNC resolver doesn't have to
match that of a previous declaration that (implicitly) used the same
assembly name but didn't use __attribute__ ((ifunc)), so alias declarations
don't get type mismatch errors.


Thanks,
Roland


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