While reverse engineering an Android process, I wanted to explore the openat function. I noticed that there is a symbol "openat" and another symbol "__openat". What is the difference between these two?
Furthermore, if I use info function openat
, I can see more openat related symbols. Can someone also explain what are the differences between these?
__dl___openat_2
__dl___openat
__openat_2@plt
openat
openat64
__openat_2
__openat
__openat_2@plt
__openat_2@plt
openattr
__openat_2@plt
sun.nio.fs.UnixNativeDispatcher.openatSupported
openat@plt
Java_sun_nio_fs_UnixNativeDispatcher_openat0
__openat_2@plt
UPDATE
Suppose I want to get a function pointer to openat, I can do this inside Android Studio
int (*getptr)(int, const char*, int, ...);
getptr = openat;
However, I cannot do it for __openat since this function does not seem to exist.
At least this is one difference between the two that I know.