Recently I tried using the GPA tool in the project, but the runtime is directly coredump.
# LD_PRELOAD=./libGPA.so ./gears
GPA interceptor init
GPA attaching context
GPA loading settings
init in constructor
Memory fault (core dumped)
My Project struct is like below:
main --(dlopen)---> libRenderEngine.so ----(link)----> libEGL.so/libGLESv2.so
But if I extra link the main program with libEGL.so and libGLESv2.so,it works.
Is the GPA library call dlsym(RTLD_NEXT, "XXX") to store the real XXX at initialize and once ? So if the main program is not link with two librarys, then the GPA can not get the right real function and lead to core dump if call.
How can I fix this problem without modify my code and library dependencies? please give me some advices,thanks!!