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]

IFUNCs used by libc.so.6 internally on x86-64


I put a debug printf into IRELATIVE processing and resolved the addresses using GDB. This way, I identified the following IFUNC-based relocations within libc.so.6:

gettimeofday
memmove
strcasecmp
strcspn
strncasecmp
strpbrk
strspn
time

time and gettimeofday appear to be side effects of the use of vsyscalls. clock_gettime is not in this list because there is no direct call to the function in libc.so, I think. timespec_get could use it, but it currently has INTERNAL_VSYSCALL instead.

The selection of string functions is rather curious. Were these choices deliberate? Why memmove and not memcpy, for example?

Should we revisit our previous approach not to use IFUNCs within libc.so? Not using IFUNCs means that we increase the icache footprint because libc.so and and other code in the process use different implementations. And if we want to optimize the callers of functions which normally call those IFUNCs, we'd need to turn them into IFUNCs as well. (IFUNCs are contagious in this way.)

Thanks,
Florian


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