Comment 4 for bug 1490956

Revision history for this message
Gerry Boland (gerboland) wrote :

Digging into hybris, glGenTextures is generated by

#define GLES2_IDLOAD(sym) \
 __asm__ (".type " #sym ", %gnu_indirect_function"); \
typeof(sym) * sym ## _dispatch (void) __asm__ (#sym);\
typeof(sym) * sym ## _dispatch (void) \
{ \
 return (void *) android_dlsym(_libglesv2, #sym); \
}

which a function that when first called overwrites it's plt entry with new address. Subsequent calls jump directly at the target function in the android library.

Qt is saving a pointer to this function, before it is ever called. Might be a problem, /me goes to learn about PLT entries